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.
I want to give a value to a parameter with javascript. I read a querystring giving by a drilldown. The parameters are important namely : (&IBIAPP_app=) &APPNAM (&IBIF_ex=) FEXNAM and &VARNAM, this 3rd one is not filled with the drilldown parameter (&SELCAR=????).
First I got a fex named CHKCAR with a drilldown to Metarefresh1.fex reads the querystring and then run CHKCAR2.fex with parameter &SELCAR.
Metarefresh1.fex fills &APPNAM and &FEXNAM correctly but &VARNAM is not filled correct.
Does someone has a answer?
The used fexen are:
*---- CHKCAR.fex
-* File chkcar.fex -DEFAULT &APPNAM='Test' -DEFAULT &FEXNAM='CHKCAR2' -*-DEFAULT &SELCAR='BMW'; TABLE FILE CAR PRINT MODEL BODYTYPE SEATS BY CAR ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, $ TYPE=DATA, COLUMN=N1, FOCEXEC=metarefresh1(APPNAM='&APPNAM' FEXNAM='&FEXNAM' SELCAR=N1), $ ENDSTYLE END
*---- CHKCAR2.fex
-* File chkcar2.fex -DEFAULT &SELCAR='BMW'; TABLE FILE CAR PRINT MODEL BODYTYPE SEATS BY CAR WHERE CAR EQ '&SELCAR'; ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, $ ENDSTYLE END
*---- Metarefresh1.fex
-* Tonen wachtscherm. -* Verwerken rapport adhv een variable.
if (i>6) { alert("name : " + name + " value : " + value + " i : " + i); webvar = "&" + name + "=" + value; webvartot += webvar; } // else if (i<5) { // webvartot = ' '; // } } alert("end webvartot : " + webvartot); &VARNAM = webvartot;
}
function Querystring_get(key, default_) { // This silly looking line changes UNDEFINED to NULL if (default_ == null) default_ = null;
var value=this.params[key]
alert("params : " + value);
if (value==null) value=default_;
return value }
-* End Querystring
<script>
// Variables you may modify -------------------------------- var fexnaam; var BackgroundColor1 = '#006942'; var BackgroundColor2 = '#ffffcc'; var Speed = 1; var PleaseWaitMsgText = 'Please wait for report';
// Array of Microsoft DXImageTransform Transitions --------- var garTransitions = new Array(01); garTransitions[0] = "progidXImageTransform.Microsoft.RadialWipe(wipeStyle='clock')";
var giDuration = Speed; function init() { div1.style.filter = garTransitions[div1.filterCount]; setTimeout("start()", 100); }
function start() { obj = div1; if (obj.filters.item(0).status==0) { obj.style.filter = garTransitions[obj.filterCount];
I'm not a javascript guru, so I can't tell exactly what it is you are trying to accomplish with all the javascript. I get the "please wait" - maybe that is the whole purpose of your javascript part - but it seems like you are also trying to construct another URL to execute instead of just letting drilldowns work as they are designed to. Just specify car2.fex in the FOCEXEC= with SELCAR=N1. No need for all the rest of the parms or the javascript. Am I oversimplifying?
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Some reports take a lot of time before they show the results, therefor I use the metarefresh1.fex as a waiting time indicator. Yes this fex takes over the drilldown action so the report will show over the 'please wait' message.
It doesn't relate to your problem directly but mentions a couple of techniques that may solve your problem - specifically the !IBI.AMP.&variable
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Can you provide any more information regarding your javascript, the one used to display the "PleaseWaitMsgText" message. I'm not a JavScript guy to the extent that I would know how to incorporate that javascript into an existing launch page whcih was created via the HTML Layout Painter.
I thank you in advance for your much appreciated insight and sharing your knowlege. -Doug
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
I am not sure what you are trying to achieve here. It seems that you are saying you cannot pick up &SELCAR. However you cannot set &variables in the way you want as they have been evaluated prior to the js being run, but if that is the case, a simple version of metafresh1.fex would be:
Every drilldown works with a javascript querystring this is everyting in a URL after ? So when Metarefresh1.fex runs it import the qeurystring and split it in 'name' and 'value'. The first two are importen for starting de drilldown fex and the rest are variables.
quote:
Originally posted by Doug: MrM,
Can you provide any more information regarding your javascript, the one used to display the "PleaseWaitMsgText" message. I'm not a JavScript guy to the extent that I would know how to incorporate that javascript into an existing launch page whcih was created via the HTML Layout Painter.
I thank you in advance for your much appreciated insight and sharing your knowlege. -Doug
This code will replace the value of IBIF_ex with the value from FEXNAM, which would seem to be the only part in the string that needs to be replaces. If you want more then this code can give the base for obtaining string/value pairs.
-HTMLFORM BEGIN
<html>
<head>
<title>Please wait...</title>
<style type="text/css">
body
{ font-family: Arial, sans-serif; font-size: 12px; font-weight: normal; margin: 0px; }
.MsgText
{ font-size: 14px; font-weight: bold; color: black;
position: relative; top:100; width: 250px; padding: 10px; }
</style>
<script>
var BackgroundColor1 = '#006942';
var BackgroundColor2 = '#ffffcc';
var Speed = 1;
var PleaseWaitMsgText = 'Please wait for report';
// Array of Microsoft DXImageTransform Transitions ---------
var garTransitions = new Array(01);
garTransitions[0] = "progid:DXImageTransform.Microsoft.RadialWipe(wipeStyle='clock')";
var giDuration = Speed;
function init() {
div1.style.filter = garTransitions[div1.filterCount];
setTimeout("start()", 100);
runIt();
}
function start() {
obj = div1;
if (obj.filters.item(0).status==0)
{
obj.style.filter = garTransitions[obj.filterCount];
if (obj.filterCount== (garTransitions.length - 1))
obj.filterCount = 0;
else
obj.filterCount = (obj.filterCount)*1 + 1.0;
obj.filters.item(0).Apply();
if (obj.innerText == PleaseWaitMsgText) {
obj.style.backgroundColor = BackgroundColor2;
obj.innerText = PleaseWaitMsgText + ' ';
}
else {
obj.innerText = PleaseWaitMsgText;
obj.style.backgroundColor = BackgroundColor1;
}
obj.filters.item(0).Play(duration=giDuration);
}
}
function done(i) {
start(i);
}
function getURLParam(strParamName){
var strReturn = "";
var strHref = window.location.href;
if ( strHref.indexOf("?") > -1 ){
var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
var aQueryString = strQueryString.split("&");
for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
if (
aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ){
var aParam = aQueryString[iParam].split("=");
strReturn = aParam[1];
break;
}
}
}
return unescape(strReturn);
}
function runIt(){
var a = getURLParam("FEXNAM");
var b = getURLParam("IBIF_ex");
var c = window.location.href;
var d = c.replace(b,a);
location.href=d;
}
window.onload = init;
</script>
</head>
<body>
<center>
<div id="div1" class= "MsgText" filterCount=0 onfilterchange=done(1)>
<script language="JavaScript">document.write(PleaseWaitMsgText);</script>
</div>
</center>
<div>
<table border="0" width="100%" id="table1">
<tr height=1000%>
<td></td>
</tr>
</table>
</div>
</body>
</html>
-HTMLFORM END
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007