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.
We would like to execute a button on an html page after a procedure has finished executing. I've tried searching topics for this but haven't been able to successfully implement anything. Essentially we would like to do the following:
Does anyone know what we are doing wrong here?
-HTMLFORM BEGIN
<html>
<script>
OnExecute(button1)
</script>
</html>
-HTMLFORM END
-RUN
This message has been edited. Last edited by: Joey Sandoval,
Prod/Dev: WebFOCUS 8.0.08 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.08 on Windows 7 Pro
The frame which runs this procedure is on an html page which contains button1. We would like the button1 click event to be executed at the final end of this procedure.
Prod/Dev: WebFOCUS 8.0.08 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.08 on Windows 7 Pro
Is this what you want: (exec fex1) -> (display an html form with another "run" button" in it after fex1 is complete to exec fex2)? If so, that's easy enough. If not, please elaborate.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
TABLE FILE CAR
PRINT
CAR.CARREC.MODEL
BY LOWEST CAR.COMP.CAR
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END
-HTMLFORM samp_form.htm
HTMLFORM code(from the GUI of course):
<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 onInitialUpdate
function onInitialUpdate(){
button1.click();
}
//End function onInitialUpdate
//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" thumbnailscale="4" elementtype="21" edaconnectionrequired="true">
<INPUT style="Z-INDEX: 1; POSITION: absolute; WIDTH: 290px; DISPLAY: none; HEIGHT: 160px; TOP: 90px; LEFT: 130px" id=button1 language=javascript tabIndex=1 onclick=button1_onclick(this) value=Button type=button autoExecute="true" requests_list="0" 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=michelle type=hidden name="ibiapp_app">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibic_server value=EDASERVE type=hidden isdataserversarea="1" name="ibic_server">
<xml id=focus_xmlelement>
<script type="text/xml">
<rootxmlnode focoption="_FOC_NULL">
<variables></variables>
<input_controls></input_controls>
<other_bound_objects></other_bound_objects>
<requests nextrequestsid="0">
<request requestid="0" sourcetype="typeFex" targettype="window" targetname="_blank" ibif_ex="focal_point_samp2.fex" activereport="0" reportcolumns="" reportrealcolumns="" ibiapp_app="michelle"></request></requests></rootxmlnode></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
We are not trying to load an HTML page from a fex. Our starting point is an html page with a frame and a button. After the frame loads our fex, we , want the fex to execute the button on our HTML page.This message has been edited. Last edited by: Joey Sandoval,
Prod/Dev: WebFOCUS 8.0.08 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.08 on Windows 7 Pro
All you need to do is add the call for the button click to the onInitialUpdate function, with the button hyperlink created to run the second fex.
Try using just this part;
//Begin function onInitialUpdate function onInitialUpdate(){ button1.click(); } //End function onInitialUpdate
//Begin function button1_onclick function button1_onclick(ctrl) { // TODO: Add your event handler code here OnExecute(ctrl) } //End function button1_onclick
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
Well, I guess if you want this to appear to magically happen after the first fex loads you could set a delay after the first fex loads and then do the button click.
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
In the focexec that runs to fill your iframe, you can save your FOCUS result as a hold file and then bang it into an html wrapper at the end that kicks off whatever javascript you like. Something like this:
TABLE FILE CAR
.
.
.
ON TABLE HOLD AS RESULT_X FORMAT HTMTABLE
END
-HTMLFORM BEGIN
<html>
<body onload="javascript:executeParentButtonClick();">
!ibi.fil.RESULT_X;
</body>
</html
-HTMLFORM END
The reference to !ibi.fil.RESULT_X drops the hold file into that location in the html code. Your focexec will run, your result will be embedded into the iframe's html source, and the onload trigger of the iframe will execute. The function called by the onload trigger can do whatever you want it to and has access to the parent's javascript functions.
Bang files are magical for filling drop-down boxes, multi-selects, etc. They're also good for pre-processing three or four report tables and dropping them sequentially one after another in a formalized output (i.e., tucked into a html table with its appropriate borders and widths.)
J.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007