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     [SOLVED] newbie - passing parameters between html pages

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] newbie - passing parameters between html pages
 Login/Join
 
Member
posted
Hi,
I am a newbie with WebFOCUS and web developing, and I hope someone can help me to figure this out.

I need to pass a WebFOCUS parameter between two html pages; unfortunately, the other posting on this forum did not help me to find a solution.

I have prepared a simple example with the CAR dataset, and I hope you can help me to let it works.

Mainly, I have:

1) an HTML PAGE SelectCountry.htm that contains
- an edit textbox to insert a selecting value
- a button to call the second html page

2) an HTML PAGE ReportCar.htm that contains
- an edit textbox to insert a selecting value
- a button to sumbit the query and visualize the report
- a report area

From the first page, when I insert a selecting value in the edit textbox and I press the button, I would like to visualize the second html page with the same value in the second selecting edit textbox.

Here the two codes I prepared for the two pages:
(Thanks in advance for your help)

SelectCountry.htm
<HTML>
<HEAD>
<META id=mycharsetmeta content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META id=Generation content="Created in release 7703, Generation 3.0">
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>

<SCRIPT id=IBI_OptionsScript type=text/javascript>
var cgipath = "cgipath";
var ibirls = "ibirls3";

var rltdyncalendar = "rltdyncalendar";
var gmap = "ibigmap";
var olap="olap";
var olappanebase="olappanebase";
var olapdrill="olapdrill";

var ibixmltree="ibixmltree";

var ibiOptions = new Array(cgipath,ibirls);
</SCRIPT>

<SCRIPT id=IBI_nls type=text/javascript src="/ibi_html/javaassist/nls.js"></SCRIPT>

<SCRIPT id=IBI_nlsVars type=text/javascript src="/ibi_html/javaassist/nlsvars.js"></SCRIPT>

<SCRIPT id=IBI_ibigbl type=text/javascript src="/ibi_html/javaassist/ibi/html/js/ibigbl.js"></SCRIPT>

<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
addIntlTranslatedJS("composertrans.js");
</SCRIPT>
<TITLE>HtmlPage</TITLE>
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
 
UpdateData();
 
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload

//Begin function button1_onclick
function button1_onclick(ctrl) {
// TODO: Add your event handler code here
OnExecute(ctrl)
}
//End function button1_onclick

//Begin function button1_onclick
function button1_onclick(ctrl) {
// TODO: Add your event handler code here
OnExecute(ctrl)
}
//End function button1_onclick

//Begin function button1_onclick
function button1_onclick(ctrl) {
// TODO: Add your event handler code here
OnExecute(ctrl)
}
//End function button1_onclick
</SCRIPT>

<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" nextelementuniquenumber="2" thumbnailscale="4" elementtype="21" edaconnectionrequired="false">
<INPUT style="Z-INDEX: 1; POSITION: absolute; WIDTH: 90px; HEIGHT: 22px; TOP: 160px; LEFT: 280px" id=COUNTRY_NAME tabIndex=1 value=ITALY size=9 defaultselection="1" persistentuniqueid="compUid_1" name="COUNTRY_NAME"> 
<INPUT style="Z-INDEX: 2; POSITION: absolute; WIDTH: 70px; HEIGHT: 20px; TOP: 160px; LEFT: 380px" id=button1 language=javascript tabIndex=2 onclick=button1_onclick(this) value=Button size=17 type=button persistentuniqueid="compUid_2" autoExecute="true" requests_list="1" name="button1">      
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden>
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value="report_expensecostcenters report_salesorders_toyexample edw report_fin" type=hidden ismre="1" name="ibiapp_app">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibif_ex value=app/selectcountry.htm type=hidden name="ibif_ex">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_domain value=finva85w/finva85w.htm type=hidden name="IBIMR_domain">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_folder value=#carexampletx type=hidden name="IBIMR_folder">
<xml id=focus_xmlelement>
<script type="text/xml" nextelementuniquenumber="3">
	
<rootxmlnode focoption="_FOC_NULL" top="45" left="10" width="150" height="130">
		
<variables></variables>
		
<input_controls>
			
<input_control bindcontrolid="compUid_1" elementtype="7" name="COUNTRY_NAME" id="COUNTRY_NAME" multiple="0" inbinding="1" top="20" left="30" width="107" height="15" onetimepopulated="1">
				
<link linktype="default" persistentuniqueid="compUid_1">
					
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" accept="0" sourcetype="typeMaster" selectedvalue="" datasource="" displayfield="" datafield="" datatype="0" addalloption="0" modifiedrequest="1" operation="NONE">
							
<![CDATA[]]>
							
<static_values>
<static value="ITALY" display="ITALY" selected="1" noinput="0"></static></static_values></data_info></condition></link></input_control></input_controls>
		
<other_bound_objects></other_bound_objects>
		
<requests nextrequestsid="1">
			
<request requestid="1" sourcetype="typeHtml" targettype="window" targetname="_blank" ibif_ex="app/reportcar.htm" IBIMR_domain="finva85w/finva85w.htm" IBIMR_folder="#carexampletx" IBIMR_sub_action="MR_STD_REPORT" activereport="0" reportcolumns="" reportrealcolumns="" ibiapp_app="report_expensecostcenters report_salesorders_toyexample edw report_fin"></request></requests></rootxmlnode></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>



ReportCar.htm
<HTML>
<HEAD>
<META id=mycharsetmeta content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META id=Generation content="Created in release 7703, Generation 3.0">
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>

<SCRIPT id=IBI_OptionsScript type=text/javascript>
var cgipath = "cgipath";
var ibirls = "ibirls3";

var rltdyncalendar = "rltdyncalendar";
var gmap = "ibigmap";
var olap="olap";
var olappanebase="olappanebase";
var olapdrill="olapdrill";

var ibixmltree="ibixmltree";

var ibiOptions = new Array(cgipath,ibirls);
</SCRIPT>

<SCRIPT id=IBI_nls type=text/javascript src="/ibi_html/javaassist/nls.js"></SCRIPT>

<SCRIPT id=IBI_nlsVars type=text/javascript src="/ibi_html/javaassist/nlsvars.js"></SCRIPT>

<SCRIPT id=IBI_ibigbl type=text/javascript src="/ibi_html/javaassist/ibi/html/js/ibigbl.js"></SCRIPT>

<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
addIntlTranslatedJS("composertrans.js");
</SCRIPT>
<TITLE>HtmlPage</TITLE>
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
 
UpdateData();
 
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
</SCRIPT>

<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" nextelementuniquenumber="1" thumbnailscale="4" elementtype="21" edaconnectionrequired="true">
<IFRAME style="Z-INDEX: 1; POSITION: absolute; WIDTH: 340px; HEIGHT: 170px; TOP: 460px; LEFT: 220px" id=report1 title=app/qecbw7cw.fex tabIndex=1 elementtype="2" requests_list="0" autoExecute="false" name="report1"></IFRAME>
<FORM style="Z-INDEX: 2; POSITION: absolute; WIDTH: 203px; HEIGHT: 110px; TOP: 320px; LEFT: 220px" id=form1 onsubmit="OnExecute(this);return false;" method=post requests_list="0" tempheight="110" tempwidth="203" fexlist_list="report1" form_newline_chain="1" default_slider_type="4" form_type="1" form_prompt_location="1" form_number_of_visible_rows="4" form_number_of_columns="4" vert_dist_between_controls="10" form_hor_dist_between_controls="10" form_dist_between_desc_and_input="10" name="form1">
<LABEL style="Z-INDEX: 6; POSITION: absolute; WIDTH: 131px; HEIGHT: 19px; TOP: 5px; CURSOR: default; LEFT: 5px" id=label1 tabIndex=5 for=COUNTRY_NAME name="edit1">COUNTRY_NAME</LABEL> 
<INPUT style="Z-INDEX: 7; POSITION: absolute; OVERFLOW-Y: visible; WIDTH: 166px; HEIGHT: 22px; OVERFLOW: visible; TOP: 34px; LEFT: 5px" id=COUNTRY_NAME tabIndex=6 value=ENGLAND hspace=0 defaultselection="1" defaultlocation="0,0,22,146" boundtovariable="1" requiredfield="1" persistentuniqueid="compUid_1" name="COUNTRY_NAME"> 
<INPUT style="BACKGROUND-IMAGE: url(htmlpathsub/javaassist/ibi/html/describe/run16.gif); Z-INDEX: 3; POSITION: absolute; BACKGROUND-COLOR: lavender; WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 22px; TOP: 83px; LEFT: 5px" id=form1Submit tabIndex=2 value=" " type=submit StyleBack_UserSuppliedFullPath="1" name="submit1"> 
<INPUT style="BACKGROUND-IMAGE: url(htmlpathsub/javaassist/ibi/html/describe/reset.gif); Z-INDEX: 4; POSITION: absolute; BACKGROUND-COLOR: lavender; WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 22px; TOP: 83px; LEFT: 91px" id=form1Reset tabIndex=3 value=" " type=reset StyleBack_UserSuppliedFullPath="1" name="reset1"> 
<INPUT style="BACKGROUND-IMAGE: url(htmlpathsub/javaassist/ibi/html/describe/schedule.gif); Z-INDEX: 5; POSITION: absolute; BACKGROUND-COLOR: lavender; WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 22px; TOP: 83px; LEFT: 134px" id=form1Schedule tabIndex=4 onclick="OnExecute(this);return false;" value=" " type=button requests_list="2" StyleBack_UserSuppliedFullPath="1" name="button1"> 
<INPUT style="BACKGROUND-IMAGE: url(htmlpathsub/javaassist/ibi/html/describe/defer.gif); Z-INDEX: 8; POSITION: absolute; BACKGROUND-COLOR: lavender; WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 22px; TOP: 83px; LEFT: 48px" id=form1Defer tabIndex=7 onclick="OnExecute(this);return false;" value=" " type=button requests_list="1" StyleBack_UserSuppliedFullPath="1" name="button2"></FORM>     
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden schedulecontrolids="form1Schedule" resourcectrlids="form1Submit;form1Reset;form1Schedule;form1Defer">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value="report_expensecostcenters report_salesorders_toyexample edw report_fin" type=hidden ismre="1" name="ibiapp_app">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibif_ex value=app/reportcar.htm type=hidden name="ibif_ex">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_domain value=finva85w/finva85w.htm type=hidden name="IBIMR_domain">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_folder value=#carexampletx type=hidden name="IBIMR_folder">
<xml id=focus_xmlelement>
<script type="text/xml" nextelementuniquenumber="2">
	
<rootxmlnode focoption="_FOC_NULL">
		
<variables>
			
<variable controltype="7" parametercreatedinreslay="0" type="default" desc="COUNTRY_NAME" name="COUNTRY_NAME" default="ENGLAND" textvarname="" accept="0" select="0" create="1">
				
<link linktype="default" from="compUid_1">
					
<condition default="1" name="Default" whattodowithcontrol="4" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" displayfield="COUNTRY_NAME" datafield="COUNTRY_NAME" datasource="car.mas" datatype="0" selectedvalue="ENGLAND" operation="" slider_range_from="" slider_range_to="" previewvalue="ENGLAND" sourcetype="typeMaster">
							
<static_values>
								
<static value="ENGLAND" display="ENGLAND" selected="1" noinput="0"></static></static_values></data_info></condition></link>
				
<requestid id="1"></requestid>
				
<requestid id="2"></requestid>
				
<requestid id="0"></requestid></variable></variables>
		
<input_controls>
			
<input_control bindcontrolid="compUid_1" elementtype="7" name="COUNTRY_NAME" id="COUNTRY_NAME" multiple="0" onetimepopulated="1">
				
<link linktype="default" persistentuniqueid="compUid_1">
					
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" datatype="0" datasource="car.mas" addalloption="0" sourcetype="typeMaster" cacheruntimedata="0" accept="0" operation="NONE">
							
<static_values>
<static value="ENGLAND" display="ENGLAND" selected="1" noinput="0"></static></static_values></data_info></condition></link></input_control></input_controls>
		
<other_bound_objects></other_bound_objects>
		
<requests nextrequestsid="2">
			
<request requestid="0" targettype="iframe" targetname="report1" sourcetype="typeFex" ibif_ex="app/qecbw7cw.fex" IBIMR_domain="finva85w/finva85w.htm" IBIMR_folder="#carexampletx" IBIMR_sub_action="MR_STD_REPORT" ibiapp_app="" activereport="0" compoundreport="0" reportcolumns="" reportrealcolumns=""></request>
			
<request requestid="1" sourcetype="typeFex" targettype="defer" targetname="report1" ibif_ex="app/qecbw7cw.fex" IBIMR_domain="finva85w/finva85w.htm" IBIMR_folder="#carexampletx" IBIMR_sub_action="MR_STD_REPORT" activereport="0" reportcolumns="" reportrealcolumns="" ibiapp_app=""></request>
			
<request requestid="2" sourcetype="typeschedule" targettype="reportcaster" targetname="EmailLibraryFTP" ibif_ex="app/qecbw7cw.fex" IBIMR_domain="finva85w/finva85w.htm" IBIMR_folder="#carexampletx" IBIMR_sub_action="MR_STD_REPORT" activereport="0" reportcolumns="" reportrealcolumns="" ibiapp_app=""></request></requests></rootxmlnode></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>

This message has been edited. Last edited by: Daniele Barone,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 16 | Registered: September 19, 2012Report This Post
Master
posted Hide Post
Hi, Daniele

Welcome to the forum.


First you should really rethink why you need a html to call another html.

In WebFocus HTML are considered to be a place to enter parameters and start reports (.fex ! ).
The output of these reports can be either in another browser, in a iframe or execl/pdf etc.


As far as I know ( and I would like it to be corrected here ) an HTML-page doesn't take 'incoming' parameters.

Can you explain why you need this? Then 'we' perhaps come up with a another solution that fits in the WebFocus vision...


By the way...
I needed a html to call another html with a parameter too, and got it to work with some scripting.
But you schould only do this if no other solution works better.

Greets, Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Guru
posted Hide Post
In the first page, create Composer parameters in addition to your current parameters, and bind the controls to them, then in the hyperlink that calls the second page, use the "Additional Parameters" button in the hyperlink dialog (it shows when you have Composer parameters) and select each if them. They will be passed on the URL. Now in the second page, have these parameters as incoming (parameter bound to object) and the value will come in to that object.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
 
Posts: 315 | Registered: April 13, 2004Report This Post
Master
posted Hide Post
@David

I stand corrected.
Never knew you could bind as incoming.

But I must say I got it to work for dropdowns. When I try it with text-box I only either:
"[object Object]"
Or
Jscript error : id.Getselecteditem etc.. error


( and my solution need to auto press the submit button as well, I'm sticking to my script )


But thanks, I learned something today.

Greets,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Member
posted Hide Post
Thank you for the welcome guys Smiler, and your prompt answer. It is always nice as a newbie to find such a support.

For Dave:
I need such a functionality to implement some back and forward buttons between my html pages that retain the values in the common filters I have selected in one of the html page.

For example: I have PageA (Filter X, Filter Y) and PageB (Filter X, Filter Y, Filter Z). When I go from PageA to PageB with a drilldown, Filter X of Page B will have a specific value, if I want to go back to PageA with a BACK button, when I reload PageA, I want that the Filter X will retain the same value.(I hope I was clear Frowner )



For David:
Thanks David, I tested your solution and it seems to work. I have only one problem. When the value coming from the first html paqe is inserted in the edit box of the second html page, the value is quoted.
for example


FIRST HTML PAGE: COUNTRY_NAME TEXT BOX = ENGLAND

(click button Smiler

SECOND HTML PAGE: COUNTRY_NAME TEXT BOX = 'ENGLAND'

How can I eliminate the ' character.

Again, thanks you both!!


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 16 | Registered: September 19, 2012Report This Post
Guru
posted Hide Post
Daniele,

I'm not sure how to do that actually. However, I believe you can take the parameter that contains that value and use FOCUS functions to remove them like TRIM.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
 
Posts: 315 | Registered: April 13, 2004Report This Post
Member
posted Hide Post
open a fex
do you thing with the variable.
below that type
-HTMLFORM BEGIN
...
...
-HTMLFORM END


WebFOCUS 7.6
Windows (oracle on unix)
all output
 
Posts: 1 | Registered: April 11, 2011Report This Post
Master
posted Hide Post
@Dirk

Yes, that's my solution also.

@Daniele
I think there is an option 'add quotes' in the inputbox properties somewhere.


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Guru
posted Hide Post
Daniele,

Please don't use -HTMLFORM. I have given you a better method and even if you have to call Support Services, the quotes issue will get resolved.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
 
Posts: 315 | Registered: April 13, 2004Report This Post
Gold member
posted Hide Post
Hi

You can have a javascript routine to remove the quotes using something like:

string.substring(from, to)

If you have problems with this please open a case with tech support.

Thanks
Barry


WebFOCUS 8103, Windows, App Studio
 
Posts: 80 | Location: NYC | Registered: November 13, 2008Report This Post
Master
posted Hide Post
I'm sure I'm somehow missing the point here, but when I go back to Daniele's original post I can't see why the second html page is necessary in the first place. She wants, it seems, to pass two parameters to a report. This doesn't need two web pages - both can be easily done on a single page, no ???


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Master
posted Hide Post
@George

You are right...
...I think Daniele could manage with one HTML.
( Not to mention the 'back'-button which nearly impossible to tame )


But...
Here's my situation that requires two HTML pages passing parameters.

I have simple page with just 1 inputbox. ( customer-info )
Here a customer ID can be entered. When 'run' is clicked the basic-data is shown in an iframe and there are about 12 buttons on this page to start various fexi in a second iframe.
( works fine )

But sometimes the user doesn't know the customer ID.
So there is also a button "browse". This starts another html ( target="_self" ).

Here the user can enter multiple inputboxes linked to search parameters in a customer-list-fex.
( e.g. name, street, postalcode, city, etc. )
When 'run' is clicked a list of customers is shown according to the searchparameters in a iframe.

In this list the user can click on a customer ( i.e. drill ).
This drill leads the user back to the first html page ( target = "_self" again ).
On this page the drilled customer ID from the list is entered in the inputbox.
( this I did with Jscript, but David's solution should work here also, although I couldn't get it to work for a simple text-input )
But secondly it should also click the 'run' button so the basic-data is directly shown.

It's actually a very basic "browse" function.
I don't see how this is done in one HTML. ( without also having to add custom scripting )


In my solution this only requires two (!) very simple lines of Jscript.

Greets,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Member
posted Hide Post
Hi everybody,
and thanks for your answers.

In someway, I think that I got it.
Just to briefly summarize:

1) Page A (Filter X, Filter Y) with a report having column X and Y

2) Page B (Filter X, Filter Z) with a report having column X and Z

In page B, I have a back button that allows to go back to Page A retaining whatever value was contained in the Filter X of Page B.


then, following the suggestion of David:


quote:

In the first page, create Composer parameters in addition to your current parameters, and bind the controls to them, then in the hyperlink that calls the second page, use the "Additional Parameters" button in the hyperlink dialog (it shows when you have Composer parameters) and select each if them. They will be passed on the URL. Now in the second page, have these parameters as incoming (parameter bound to object) and the value will come in to that object.


I had created "composed parameters" that I discovered are the ones with dashed lines Smiler Therefore I created a parameter called X for my filter X. The major problem was that I had already a report parameter called X for the report I am calling in the page, and that was messing up everything. Therefore, I applied the following solution that has two parameters, one for the report and one that needs to be passed, both linked to the filter X edit box:


FILTER X EDIT BOX ---link----> (Report parameter) X

(and I created another link)

FILTER X EDIT BOX ---link----> (Composer parameter with dashed line) PASSED_X

This last parameter is the one showing up in the
quote:
"Additional Parameters" button in the hyperlink dialog (it shows when you have Composer parameters)
as precisely specified by David.

Now, in the page called by the hyperlink I introduced the following Java script code:


 
<SCRIPT language=JavaScript type=text/javascript>
function onInitialUpdate(){
	if (params) {

    if (params["PASSED_X"]) {
     var PASSED_X= unescape(params["PASSED_X"]);
	if (PASSED_X) document.getElementById('FILTER_X').value = PASSED_X;
   }


    }

}
function getParams() {
var idx = document.URL.indexOf('?');
if (idx != -1) {
var tempParams = new Object();
var pairs = document.URL.substring(idx+1,document.URL.length).split('&');
for (var i=0; i<pairs.length; i++) {
nameVal = pairs[i].split('=');
tempParams[nameVal[0]] = nameVal[1];
}
return tempParams;
}
}
var params = getParams();
</SCRIPT>



and the function calling onInitialUpdate(); as shown below:


 
//Begin function window_onload
function window_onload() {
 
UpdateData();
 
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
onInitialUpdate();
}
//End function window_onload



This seems work. I am still new with IBI; therefore, probably there is a better way to do what I need, experience and your support will tell.
Daniele (@George: Daniele is a male Italian name Smiler)

@David:
It is kind of weird since the value in my car example was passed with single quotes, but in the pages I am creating it is passed without quotes. Maybe there is a difference that I cannot see now, but it works. Thanks again for your suggestion and help, much appreciate.

@George and Dave:
The example I provided is a simplification of what the situation it really is, but I would still think about your suggestions, whether or not I can manage the two reports with a unique html page (although the reports have different contents).


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 16 | Registered: September 19, 2012Report This Post
Virtuoso
posted Hide Post
I cheat. I use focexecs like jsp pages with amper-variables embedded between -htmlform tags. Works like a charm. I put Maintain code in them sometimes too. I'm sure this would be considered an awful idea in NY, but it works really well and is super-fast to code. I've punched out whole data-editing web sites in a day with it.

Note that I don't do this with code from the Composer. Strictly my own html.

J.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Master
posted Hide Post
My solution: ( just sharing )

PASS_PARAM : What ever parameter you want to pass.
MY_HTM.htm : The HTML you want to go to.
edit1      : The name of the inputbox in the hmtl.



MY_HTM_WRAPPER.FEX
 
-DEFAULTH &PASS_PARAM = '';
-HTMLFORM app/MY_HTM.htm

-IF &PASS_PARAM NE '' OR ' ' THEN CONTINUE ELSE EXIT;
-HTMLFORM BEGIN
<SCRIPT LANGUAGE='JSCRIPT'>
document.getElementById('edit1').value = '!IBI.AMP.PASS_PARAM;';
</SCRIPT>
-HTMLFORM END


And then just link/drill to MY_HTM_WRAPPER.FEX instead of MY_HTM.htm


Greets,Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Member
posted Hide Post
quote:
My solution: ( just sharing )

PASS_PARAM : What ever parameter you want to pass.
MY_HTM.htm : The HTML you want to go to.
edit1 : The name of the inputbox in the hmtl.


MY_HTM_WRAPPER.FEX


-DEFAULTH &PASS_PARAM = '';
-HTMLFORM app/MY_HTM.htm

-IF &PASS_PARAM NE '' OR ' ' THEN CONTINUE ELSE EXIT;
-HTMLFORM BEGIN
<script LANGUAGE='JSCRIPT'>
document.getElementById('edit1').value = '!IBI.AMP.PASS_PARAM;';

-HTMLFORM END



And then just link/drill to MY_HTM_WRAPPER.FEX instead of MY_HTM.htm

quote:
y

Thanks, Dave!


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 16 | Registered: September 19, 2012Report 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     [SOLVED] newbie - passing parameters between html pages

Copyright © 1996-2020 Information Builders