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.
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>
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, 2010
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
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, 2010
Thank you for the welcome guys , 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 )
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
SECOND HTML PAGE: COUNTRY_NAME TEXT BOX = 'ENGLAND'
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
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
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 ???
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, 2010
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 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 )
@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).
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, 2007
-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