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.
I am trying to either refresh a page or turn off a link automatically once it is clicked.
I know Web Focus won't return anything to the browser until the request is completed, but can I refresh that page or gray out that link that was pushed?
This is not in HTML.
Web Focus: DEV: v5.3 UAT: v5.3 PROD: v5.3
Dev, SIT, UAT, Production:7.6.6 Dev Sandbox:7.6.11
you can change the link's color once its been clicked using style commands in the -HTMLFORM surrounding the output a:hover and a:visited and a:active... or you can have your drilldown refer to a fex that launches a refresh page...a temporary page launched with 0 milliseconds refresh time .. and the refresh page it goes to is the actual drilldown fex your user would be wanting. This would prevent your end user from clicking again and again on the same link.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Not sure if this is exactly possible with your scenario, but you could set the tags HREF property to javascript:void(); when clicked. Of course, to do this the tag would have to have a name attribute so that you can identify it. You can't do this directly using WF code so you'd have to resort to using an HTMTABLE output and including some javascript in the body.
You need the javascript in the body and not the head as the main HTMLTABLE will not have been interpreted when the javascript is run, as in my example below the javascript is not contained in a function.
Anyway, this works (in 7.1.3) by changing the links href attribute -
-* File disable_link.fex
-DEFAULT &Country = 'FOC_NONE'
-SET &JS_Var = '"'|&Country||'"';
TABLE FILE CAR
SUM RCOST
DCOST
BY COUNTRY
BY CAR
BY MODEL
ON TABLE HOLD AS MYREP FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=COUNTRY, FOCEXEC=disable_link.fex(Country=COUNTRY), name=COUNTRY, $
ENDSTYLE
END
-HTMLFORM BEGIN
<html>
<head>
<title>Disable Link</title>
</head>
<body>
!IBI.FIL.MYREP;
<script language=javascript>
var JS_Var = !IBI.AMP.JS_Var; ;
Atags = document.getElementsByTagName("a");
// alert(Atags.length+" links");
for (x = 0; x < Atags.length; x++) {
Aname=Atags[x].innerHTML;
Atags[x].name = Aname;
if (JS_Var!="FOC_NONE" && JS_Var==Aname) {
// alert("You clicked "+JS_Var);
Atags[x].href="javascript:void()";
}
}
</script>
</body>
</html>
-HTMLFORM END
T
edited to remove the &variable in the javascript and replace it with the !IBI.AMP.xxx alternativeThis message has been edited. Last edited by: Tony A,
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Hi Tony, I tried your suggestion and the link is not voiding out. When I click on it and it starts running, if I click on it again, I can see on my server that another agent starts running. Perhaps I am not doing this right.
I will keep working with it.
Susannah,
Can you elaborate a little more on your idea. More specifically the launch page that is to go to a refresh page. I tried to have it go to a page that gives a message and then executes the intended file, but it will not do anything until the full action is complete, so the button is still visible for users to click.
Thank you both for responding!
Dev, SIT, UAT, Production:7.6.6 Dev Sandbox:7.6.11
It is likely that your page is refreshing from cache only. Try pressing ctrl and F5 to force a refresh.
Once you have clicked a link, hovering over it should show on the status bar that the HREF attached to that link has been changed to "javascript:void()".
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
see the CONTENT=0 bit? that makes the lag time between this page and the redirected page zero. so this 'im thinking' page will stay alive until the real fex finishes... i got this technique from ruben rivera at ibi spain, right here on 'the Point'...
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003