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     [CLOSED] How to pass the js variable to fex variable ?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] How to pass the js variable to fex variable ?
 Login/Join
 
Member
posted
Hi,ALL:
I'm new about the webfocus . Now I have a problem about the variable betweent js and fex.
I konw pass the fex variable to js variable like this : !IBI.AMP.v=jSvalues;
But How to pass the js variable to fex variable ?In the fex file , I use the javascript to get my value from html , and i wanna pass it to the variable to &v which is in the fex .

here the partial code of projectProcessBar2.fex:

-* File projectProcessBar2.fex 
-SET &v = '';                           //the variable in fex
-RUN
-HTMLFORM BEGIN
<HTML>
<HEAD>
<script>
	function getCompanyCode()
	{
		var ck = parent.document.getElementsByName('combobox5');
		var values = '';                  //the js variable get from html
		for(i = 1; i < ck.length ; i++){
			if(ck[i].checked){
				values += ck[i].value;
			}
		}	
	}
</script>
</HEAD>
<body  onLoad="java_script:getCompanyCode[)">
</body>
</HTML>
-HTMLFORM END


//I want pass the js variable to the fex variable like this ?
//  -SET &v = value  ??   

GRAPH FILE UPITEM_JOIN
SUM UPITEM_JOIN.UPITEM_CASHESCHEDULE.ITEMCOUNT
ACROSS UPITEM_JOIN.UPITEM_BIZ_CODE2.ITEMTYPE
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 1065
ON GRAPH SET VAXIS 520
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setSeriesLooping(20);
setTransparentBorderColor(getSeries(0),true);
...................
ENDSTYLE

This message has been edited. Last edited by: Kerry,
 
Posts: 6 | Registered: November 17, 2011Report This Post
Member
posted Hide Post
up !


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 6 | Registered: November 17, 2011Report This Post
Guru
posted Hide Post
You can assign the value of the JS var to an object in the html screen, which is sent to WF and will become and will become an amper variable with the same name as the html object. If you wan't to check it, you can query the list of amper values with the -? & statement in WF.


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
 
Posts: 319 | Location: Stockholm, Sweden | Registered: February 04, 2004Report This Post
Member
posted Hide Post
quote:
Originally posted by H Lidholm:
You can assign the value of the JS var to an object in the html screen, which is sent to WF and will become and will become an amper variable with the same name as the html object. If you wan't to check it, you can query the list of amper values with the -? & statement in WF.


Thanks for your reply , but my purpose is not assign the amper variable from js variable in the 'html' .
My purpose is assign the amper variable from js variable in the 'fex file' .


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 6 | Registered: November 17, 2011Report This Post
Virtuoso
posted Hide Post
Bennie

As Håkan was saying, the only link between a js variable, which is known only to the browser, and WebFOCUS that runs on the server, is the URL or
call to WebFOCUS.

Pass the js variable as a parameter when calling WebFOCUS and then WebFOCUS will pick it up as the named parameter.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Guru
posted Hide Post
In your js you assign the input object jsvar (or whatever you want to call it) the value of the js variable. When you submit the screen to webfocus, you will get an amper variable called &country.

<INPUT id=country type=hidden name="country">

GRAPH FILE CAR
SUM CAR.BODY.DEALER_COST CAR.BODY.RETAIL_COST
ACROSS CAR.COMP.CAR
WHERE COUNTRY EQ '&country.EVAL';
END

This message has been edited. Last edited by: Håkan,


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
 
Posts: 319 | Location: Stockholm, Sweden | Registered: February 04, 2004Report This Post
Member
posted Hide Post
Thanks for Lidholm and Alan .Maybe I need resovle my problem in another way. Sweating


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 6 | Registered: November 17, 2011Report 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     [CLOSED] How to pass the js variable to fex variable ?

Copyright © 1996-2020 Information Builders