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     Passing parameters from 2 different HTML's

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Passing parameters from 2 different HTML's
 Login/Join
 
Member
posted
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 &SORT1 = 'DEPARTMENT',
-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 '';
-RUN
TABLE FILE EMPLOYEE
PRINT
DEPARTMENT
&outcol1
&outcol2
&outcol3
&outcol4
&outcol5
&SORT1
&SORT2
&SORT3
&SORT4
&SORT5
HEADING
"Employee Details "
WHERE DEPARTMENT CONTAINS &DEPARTMENT.(OR(FIND DEPARTMENT IN EMPLOYEE)).DEPARTMENT.;

Kindly help me out ASAP.

Thanks in advance.
 
Posts: 10 | Registered: April 19, 2006Report This Post
Virtuoso
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:
 
<HTML>
<HEAD>
</HEAD>
<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> 
<br><br>
<iframe name=frame1 width=400 height=220 border=yes src=iframe.htm>
<br><br>
<iframe name=frame2 width=400 height=220 border=yes>
</BODY>
</HTML>
The iframe.htm code:
<HTML>
<HEAD>
<script>
function doCopy() {
var xyzzy = top.document.getElementById('edit1');
document.forms.doit.edit1.value=xyzzy.value;
var xyzzy = top.document.getElementById('edit2');
document.forms.doit.edit2.value=xyzzy.value;
document.forms.doit.submit();
}
</script>
</HEAD>
<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> 
<br><br>
<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>
</form>
</BODY>
</HTML>
And the show_me.fex code:
-TYPE &|edit1 = &edit1
-TYPE &|edit2 = &edit2
-TYPE &|edit3 = &edit3
-TYPE &|edit4 = &edit4

Hope this helps....


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Member
posted Hide Post
GamP,
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
Guru
posted Hide Post
Moju,

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'

Cheers

Stu


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