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'm trying to automatically get the "this.window.name" function to populate in a parameter in my fex. At the moment, all I am able to do is get this to work by calling the variable via onclick. My problem is separated into two items:
1. How do I get javascript to run onload within a .fex? 2. How do I pass the variable set in javascript back to an & variable that the .fex can read?
Here's the code I'm working with so far.
TABLE FILE CAR
HEADING
"CLICK HERE"
PRINT CAR NOPRINT
WHERE RECORDLIMIT EQ 1
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=HEADING,JAVASCRIPT=SAVEDAT(),$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
<script language="javascript">
function SAVEDAT()
{
var usrid=parent.MyHTMLParmsPage = this.window.name;
alert(usrid);
}
</script>
</html>
-HTMLFORM END
Thanks in Advance!!This message has been edited. Last edited by: FP Mod Chuck,
Thank you very much for your response. so if I just put this at the beginning of the report, it looks like nothing runs. Am I doing something wrong? Do I need to use a different function?
What function would I use to pass the var usrid to something WebFOCUS could read?
-HTMLFORM BEGIN
<html>
<script language="javascript">
function SAVEDAT()
{
var usrid=parent.MyHTMLParmsPage = this.window.name;
alert(usrid);
}
</script>
</html>
-HTMLFORM END
-HTMLFORM BEGIN
<html>
<script language="javascript">
var usrid=parent.MyHTMLParmsPage = this.window.name;
alert(usrid);
</script>
</html>
-HTMLFORM END
Thank you Waz, didn’t see your point about removing the function earlier. How about reading the parameter in the .fex in WebFOCUS? Is there a function that needs to happen? I know there’s some html ibi.amp thing that you put in the code.
Is there a better way to read the current portal page other than this.window.name btw?
There are possibly other ways to do it, but my suggestion for simplicity sake is to call your fex with the parameter from the HTML page, passing the name.
Something like this.
-HTMLFORM BEGIN
<html>
<script language="javascript">
window.location = '/ibi_apps//run.bip?BIP_REQUEST_TYPE=BIP_LAUNCH&|BIP_folder={IBFS Location}&|BIP_item={fexname}&|PAGENAME='+this.window.name ;
</script>
</html>
-HTMLFORM END
The fex will get the window name in the variable &PAGENAME
For what it's worth, language="javascript" is not a valid attribute for a script element. The proper attribute is a JavaScript MIME type like this:
<script type="text/javascript">
With that said, the HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type. So that means that all you need is <script> and you're good to go.
Hallway
Prod: 8202M1
Test: 8202M4
Repository:
OS:
Outputs:
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015