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 am switching from cgi-bin to WFServlet, and a section of code that contains blocks of -HTMLFORM BEGIN and -HTMLFORM END intermingled with Dialogue Manager is now failing. So I want to convert the code to Javascript in one -HTMLFORM block. But I need to access the values of dynamically generated WebFocus variable names in Javascript, which I can't figure out how to do. A small sample of code illustrating what I am trying to accomplish is included below. Any help would be appreciated.
// dynamically build WF variable name, then // store value of variable for (idx=1; idx<=!IBI.AMP.WFVARCNT;; idx++) { WFVarName = '!IBI.AMP.WFVAR' + idx + ';'; // -> need WFVarValue[idx] = value of WFVarName } }
-HTMLFORM END
Posts: 210 | Location: Ottawa | Registered: November 03, 2005
// Declare Array WFVarValue = new Array(); /* -HTMLFORM END
-REPEAT REP_END1 FOR &COUNTER FROM 1 TO &WFVARCNT
-SET &VAR = &WFVAR.&COUNTER;
-HTMLFORM BEGIN */ WFVarValue[!IBI.AMP.COUNTER;] = '!IBI.AMP.VAR;'; /* -HTMLFORM END
-REP_END1
-HTMLFORM BEGIN */ function test() {
for (idx=1; idx<=!IBI.AMP.WFVARCNT;; idx++) { alert(WFVarValue[idx]); } }
-HTMLFORM END
The Javascript comment tags (/* */) are there to disable the HTML comments that WebFOCUS puts in at every HTMLFORM BEGIN and END. To see what I mean, view source after running this fex.
Francis.This message has been edited. Last edited by: <Maryellen>,
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Thanks for the welcome, and even more thanks for this solution! You are awesome!! Adding the /* and */ worked like a charm!! We're going to have to get you bumped up to 5 stars!
Thanks again, Sean
Posts: 210 | Location: Ottawa | Registered: November 03, 2005