Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     javascript function is not getting passed when distributed to a mail list (caster)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
javascript function is not getting passed when distributed to a mail list (caster)
 Login/Join
 
Gold member
posted
Hi All,

I have a report which has a hyperlink embedded in the body and I made style command
-SET &VURL='http://www.yahoo.com';
JAVASCRIPT=show_url('&VURL'),$. 

My show_url has the code like,
-HTMLFORM BEGIN
<HTML>
<HEAD>
<SCRIPT>
function show_url(url)
{
alert(url);
window.open(url);
}
</SCRIPT>
</HEAD>
</HTML>
-HTMLFORM END


It is opening the url correctly, if I run the FEX from reporting server.If I try to schedule the same report in report caster the output I received thru mail still have the hyper link . If I click on the link it is not opening the specified url.The reason also I found out as;
the report is not able to carry the javascript function to the mail server.

Any idea , how to solve this?

This message has been edited. Last edited by: johney,


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
 
Posts: 83 | Registered: October 19, 2007Report This Post
Gold member
posted Hide Post
Hi All,

I tried using the window.open directly as below,

  
-SET &VURL='http://www.yahoo.com';
JAVASCRIPT=window.open('&VURL'),$


It is now opening the link even in the mail attachment, but opening one extra window with [object] as the only content.

Any idea, how to hide this window?

Regards,
Johney.


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
 
Posts: 83 | Registered: October 19, 2007Report This Post
Gold member
posted Hide Post
Hi All,

I solved the issue by using location.href as below.

OBJECT=TEXT,
ITEM=1,
TARGET='_blank',
JAVASCRIPT=location.href('&VURL') ,$

Regards,
Johney.


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
 
Posts: 83 | Registered: October 19, 2007Report This Post
Gold member
posted Hide Post
Hi All,

I still face some issues like , if the report caster send the report content as inline message to a outlook mail address , I am not able to open the url. If report caster send the mail as an attachment the url is opening.

So I tried another method as ,
OBJECT=TEXT,
ITEM=1,
TARGET='_blank',
URL=&VURL,$


It is opening in both inline and attachment but, here the issue is like , if the url contain a '&' then the report will fail becasue it will expect a value here as a variable.

Suppose our VURL has a value as ,
  'http://www.google.com/search?hl=en&q=johney&btnG=Google+Search' 



and I made this as (ampersand escaped)
'http://www.google.com/search?hl=en%26q=johney%26btnG=Google+Search'


still it is not working.

Any suggestions?


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
 
Posts: 83 | Registered: October 19, 2007Report This Post
Expert
posted Hide Post
for focus, the pipe character works well to escape the &
eg
& nbsp;
(ignore the blank space between the & and the nbsp) should be written
&|nbsp;

any help?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Gold member
posted Hide Post
Susannah,

I have solved the problem by escaping & = { } characters using.
-SET &VURL = STRREP(&VURL.LENGTH, &VURL, 4, '&', 1, '%26', &VURL.LENGTH, 'A&VURL.LENGTH');
-SET &VURL = STRREP(&VURL.LENGTH, &VURL, 4, '=', 1, '%3D', &VURL.LENGTH, 'A&VURL.LENGTH');
-SET &VURL = STRREP(&VURL.LENGTH, &VURL, 4, '{', 1, '%7B', &VURL.LENGTH, 'A&VURL.LENGTH');
-SET &VURL = STRREP(&VURL.LENGTH, &VURL, 4, '}', 1, '%7D', &VURL.LENGTH, 'A&VURL.LENGTH');

Thanks for your suggestion(I am yet to test that).

Regards,
Johney.


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
 
Posts: 83 | Registered: October 19, 2007Report This Post
Gold member
posted Hide Post
Hi All,

Anybody has a clue for my first question(refer the first one in this chain please)?
Why a javascript function enclosed inside the FEX is not visible, when report caster send the output to an email server? I have written my show_url function inside HEAD tag and as far as I know a javascript function written in HEAD tag should be passed without any issues.

Regards,
Johney.


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
 
Posts: 83 | Registered: October 19, 2007Report This Post
Expert
posted Hide Post
but Outlook is not a browser.. a mantra ...
so, when including links in pages that I email , i make sure no js is involved , ie only the first drilldown choice in a multidrill will work; drill-ups to controlled new windows wont work, so for email i just make my drill-ups into ordinary drilldowns with target=new.
Perhaps there is a way, and someone smarter will come along and show us both.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     javascript function is not getting passed when distributed to a mail list (caster)

Copyright © 1996-2020 Information Builders