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] Pass parameters from one html page to an embedded proc in another html

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Pass parameters from one html page to an embedded proc in another html
 Login/Join
 
Member
posted
Hi,

I have a html page that accepts input from users. And then on a button click opens another html url. I have an embedded procedure on the second html page that needs the input from the previous page. I can pass the params using ?param1=xyz, but not sure how to pass that to the embedded procedure. Any ideas on how this can be achieved?

Thanks,
Nam

This message has been edited. Last edited by: Kerry,


WebFocus 76
Windows Vista
 
Posts: 10 | Registered: February 27, 2009Report This Post
Expert
posted Hide Post
Use server side processing to apply the string to hidden controls. You could use any server side process such as WebFOCUS, ASP, JSP etc, etc.

T
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Hi Nam,

I use little pieces of javascript to do exactly that.
the following code just shows on the page whatever is to the right of the ? mark in the url (these are the parameters of the page), you can of course modify the script to filter out whatever you need and apply it to whatever you want on your page.
     <script>
      var locate = window.location;
      document.user.naam.value = locate;
      var text = document.user.naam.value;
      var params=text.indexOf("?");
      document.write(text.substring(params+1,text.length)); 
     </script>

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
Hi GamP,

Thanks a lot for your reply!
I used a similar script as below to read the param and bind it to a text box which in turn is assigned to the procedure. You helped me reassure javascript is the right choice here.

 
function window_onload() {
UpdateData();
fullURL = parent.document.URL;
val = fullURL.substring(fullURL.indexOf('?')+8, fullURL.length);
edit1.value=val;
}


Yet another problem I have is the procedure executes at the same time the text box is populated so it does not get the value when it executes. Below is the code. Please let me know how I can get the procedure to run with the param passed in.

 
<HTML>
<HEAD>
<TITLE>HtmlPage</TITLE>
<BASE href=HTTP://localhost:8080>
<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
fullURL = parent.document.URL;
val = fullURL.substring(fullURL.indexOf('?')+8, fullURL.length);
RECORD_LOCATOR.value=val;
}
//End function window_onload
</SCRIPT>

<SCRIPT for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>

<META content="MSHTML 6.00.6000.16386" name=GENERATOR></HEAD>
<BODY style="OVERFLOW: auto" edaconnectionrequired="true">
<INPUT id=edit1 accept=0 name=RECORD_LOCATOR boundtovariable="1" datasource datatype="0" sourcetype="typeMaster" selectedvalue operation="NONE" addalloption="0"> 
<SPAN id=tab1 style="Z-INDEX: 1; LEFT: 10px; WIDTH: 850px; POSITION: absolute; TOP: 90px; HEIGHT: 580px" tabIndex=1 elementtype="38">
<SPAN id=tabitem1 style="BORDER-RIGHT: teal 1px solid; BORDER-TOP: rgb(224,192,64) 3px solid; Z-INDEX: 4; LEFT: 15px; BORDER-LEFT: teal 1px solid; WIDTH: 100px; CURSOR: hand; POSITION: absolute; TOP: 0px; HEIGHT: 26px; BACKGROUND-COLOR: white; TEXT-ALIGN: center" tabIndex=2 elementtype="39" tabbody="tabitembody1" selectedtab="true">Reservation</SPAN> 
<SPAN id=tabitembody1 style="BORDER-RIGHT: teal 1px solid; BORDER-TOP: teal 1px solid; DISPLAY: block; Z-INDEX: 3; LEFT: 0px; BORDER-LEFT: teal 1px solid; WIDTH: 850px; BORDER-BOTTOM: teal 1px solid; POSITION: absolute; TOP: 25px; HEIGHT: 555px; BACKGROUND-COLOR: white" tabIndex=3 elementtype="40">
<IFRAME id=iframe1 style="Z-INDEX: 5; LEFT: 20px; WIDTH: 810px; POSITION: absolute; TOP: 25px; HEIGHT: 500px" tabIndex=4 name=iframe1 autoExecute="True" requests_list="0"></IFRAME></SPAN></SPAN>
<xml id=ibi_requests>
<script>
	
<requests>
		
<request requestid="0" sourcetype="typeFex" targettype="iframe" targetname="iframe1" ibif_ex="reservation_details.fex" ibic_server="" activereport="0" reportcolumns="" ibiapp_app="pnrreports baseapp">
			
<variables>
<variable field="RECORD_LOCATOR" file="reservation.mas" desc="RECORD_LOCATOR" datatype="0" operation="" default="" name="RECORD_LOCATOR" textvarname="" accept="0" type="unresolved" select="0" min="" max="" controltype="7" create="1"></variable></variables></request></requests></script>
</xml></BODY></HTML>

This message has been edited. Last edited by: Nam,


WebFocus 76
Windows Vista
 
Posts: 10 | Registered: February 27, 2009Report This Post
Member
posted Hide Post
Ok. here is how I got it to work. I am firing a button click event in which the procedure is executed. I dont know if its the best way but here it is. Any suggestions are welcome.

 
<HTML>
<HEAD>
<TITLE>HtmlPage</TITLE>
<BASE href=HTTP://localhost:8080>
<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
fullURL = parent.document.URL;
val = fullURL.substring(fullURL.indexOf('?')+8, fullURL.length);
RECORD_LOCATOR.value=val;
button1_OnClick(document.getElementById("button1"));

}
//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
</SCRIPT>

<SCRIPT for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>

<META content="MSHTML 6.00.6000.16386" name=GENERATOR></HEAD>
<BODY style="OVERFLOW: auto" edaconnectionrequired="true">
<INPUT id=RECORD_LOCATOR style="DISPLAY: none" accept=0 name=RECORD_LOCATOR boundtovariable="1" datasource datatype="0" sourcetype="typeMaster" selectedvalue operation addalloption="0"> 
<SPAN id=tab1 style="Z-INDEX: 1; LEFT: 10px; WIDTH: 850px; POSITION: absolute; TOP: 90px; HEIGHT: 580px" tabIndex=1 elementtype="38">
<SPAN id=tabitem1 style="BORDER-RIGHT: teal 1px solid; BORDER-TOP: rgb(224,192,64) 3px solid; Z-INDEX: 4; LEFT: 15px; BORDER-LEFT: teal 1px solid; WIDTH: 100px; CURSOR: hand; POSITION: absolute; TOP: 0px; HEIGHT: 26px; BACKGROUND-COLOR: white; TEXT-ALIGN: center" tabIndex=2 elementtype="39" tabbody="tabitembody1" selectedtab="true">Reservation</SPAN> 
<SPAN id=tabitembody1 style="BORDER-RIGHT: teal 1px solid; BORDER-TOP: teal 1px solid; DISPLAY: block; Z-INDEX: 3; LEFT: 0px; BORDER-LEFT: teal 1px solid; WIDTH: 850px; BORDER-BOTTOM: teal 1px solid; POSITION: absolute; TOP: 25px; HEIGHT: 555px; BACKGROUND-COLOR: white" tabIndex=3 elementtype="40">
<IFRAME id=iframe1 style="Z-INDEX: 5; LEFT: 20px; WIDTH: 810px; POSITION: absolute; TOP: 25px; HEIGHT: 500px" tabIndex=4 name=iframe1></IFRAME></SPAN></SPAN>
<INPUT language=javascript id=button1 style="DISPLAY: none; Z-INDEX: 6; LEFT: 190px; WIDTH: 70px; POSITION: absolute; TOP: 20px; HEIGHT: 20px" onclick=button1_OnClick(this) tabIndex=5 type=button value=Button name=button1 requests_list="0"> 
<xml id=ibi_requests>
<script>
	
<requests>
		
<request requestid="0" sourcetype="typeFex" targettype="iframe" targetname="iframe1" ibif_ex="reservation_details.fex" ibic_server="" activereport="0" reportcolumns="" ibiapp_app="pnrreports baseapp">
			
<variables>
				
<variable field="RECORD_LOCATOR" file="reservation.mas" desc="RECORD_LOCATOR" datatype="0" operation="" default="" name="RECORD_LOCATOR" textvarname="" accept="0" type="unresolved" select="0" min="" max="" controltype="7" create="1"></variable></variables></request></requests></script>
</xml></BODY></HTML>

 


WebFocus 76
Windows Vista
 
Posts: 10 | Registered: February 27, 2009Report 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] Pass parameters from one html page to an embedded proc in another html

Copyright © 1996-2020 Information Builders