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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at and provide your corporate email address, company, and name.

Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Passing parameters from 2 different HTML's

Read-Only Read-Only Topic
Passing parameters from 2 different HTML's
There are currently 3 files, in that 2 HTML & 1 Fex file.

1. Welcom Page
2. Report Main
3. Report.fex

By default "Welcome Page" will be displayed in which report is viewed in a frame.
From the First page( Welcome Page) if user wants any of the columns(Show/Hide, Sort etc), he will navigate to the second HTML page ( Report Main).
Whatever columns he is selecting/deselecting, accordingly the report is getting updated. This functionality has been implemented.

Now what we need to achieve is...

1. From the First page(Welcome Page), if the user selects any of the filters provided in the ListBox , after passing the required parameters from the second page then report is not getting updated accordingly but the report is applying filters on the colums where we have set some default column names. We have to apply the filter conditions based on the parameters which we have received from Second HTML.
2. After user navigates from the Second page ( Report Main) to the first page (Welcome Page), & if he wants to make any other changes, that is if he wants to go
back to the second page(Report Main) from the first page, then he has to view all the values that he had selected previously. Probably we need to create a
session for this.

The code which we have used in FEX is as follows...

-DEFAULT &sortcol1 = 'DEPARTMENT',
-DEFAULT &sortcol2 = '',
-DEFAULT &sortcol3 = '',
-DEFAULT &sortcol4 = '',
-DEFAULT &sortcol5 = '',
-DEFAULT &outcol1 = 'FIRST_NAME';
-DEFAULT &outcol2 = 'LAST_NAME';
-DEFAULT &outcol3 = '';
-DEFAULT &outcol4 = '';
-DEFAULT &outcol5 = '';
-SET &SORT1 = IF &sortcol1 NE '' THEN 'BY &sortcol1.EVAL ' ELSE '';
-SET &SORT2 = IF &sortcol2 NE '' THEN 'BY &sortcol2.EVAL ' ELSE '';
-SET &SORT3 = IF &sortcol3 NE '' THEN 'BY &sortcol3.EVAL ' ELSE '';
-SET &SORT4 = IF &sortcol4 NE '' THEN 'BY &sortcol4.EVAL ' ELSE '';
-SET &SORT5 = IF &sortcol5 NE '' THEN 'BY &sortcol5.EVAL ' ELSE '';
"Employee Details "

Kindly help me out ASAP.

Thanks in advance.
Posts: 10 | Registered: April 19, 2006Report This Post
posted Hide Post
Here is an example of how this could be done.
Three files. First is my test.htm, which is the start of the example. This one will load the second file (iframe.htm) in an iframe, which contains the logic to call the fex. The fex only shows the parameters being entered.
The test.htm code:
<BODY language=javascript style="OVERFLOW: auto">
Variables outside of the iframe:<br>
edit1: <INPUT type=text id=edit1 name=edit1> <br>
edit2: <INPUT type=text id=edit2 name=edit2> 
<iframe name=frame1 width=400 height=220 border=yes src=iframe.htm>
<iframe name=frame2 width=400 height=220 border=yes>
The iframe.htm code:
function doCopy() {
var xyzzy = top.document.getElementById('edit1');
var xyzzy = top.document.getElementById('edit2');
<BODY language=javascript style="OVERFLOW: auto">
<form name=doit action=/ibi_apps/WFServlet method=post target=frame2>
<INPUT type=hidden name=edit1> 
<INPUT type=hidden name=edit2> 
Variables inside the iframe<br>
edit3: <INPUT type=text id=edit3 name=edit3><br> 
edit4: <INPUT type=text id=edit4 name=edit4> 
<INPUT type=hidden name=IBIAPP_app value="test baseapp">
<input type=button value="Show me" onclick=doCopy();>
<input type=hidden name=IBIF_ex value=show_me>
And the show_me.fex code:
-TYPE &|edit1 = &edit1
-TYPE &|edit2 = &edit2
-TYPE &|edit3 = &edit3
-TYPE &|edit4 = &edit4

Hope this helps....


- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
posted Hide Post
Thanks for your help. I tried to deploy your code but I'am unable to extract the values from the frame.
And also functionality which I'am looking for is not getting implemented.

Whatever parameters you are going to pass from the Second HTML, there should be some thing that holds these values so that I can apply Filter condition (Filter Paramenter from the First page) on top of it.

Thanks in advance.
Posts: 10 | Registered: April 19, 2006Report This Post
posted Hide Post

From you description it looks like you are going to have to add some hidden input boxes on both HTML pages and add JavaScript code to check if these values are being passed when the page loads and populate the hidden input. This can be done solely on the client side with Javascript or done on the server side with asp or jsp pages. A google search on "Passing parameters between html pages" will give you a bucket-load of examples of how to do this.

If you can post the HTML (does this forum allow attachments?) for the 2 pages we may be able to help you better.

Also during debugging of HTML forms I find it easier to use method='get' so that I can see what is being passed in the URL. After things work I change it back to method='post'



WebFOCUS 8.2.03 (8.2.06 in testing)
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report 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     Passing parameters from 2 different HTML's

Copyright © 1996-2020 Information Builders