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     [CLOSED] How to pass variable from javascript to fex file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] How to pass variable from javascript to fex file
 Login/Join
 
Member
posted
In other forums, expects suggest to have JS variable passed through input object.

Is this the only way to pass variables from JS to fex?

Thanks
KR

Webfocus v8203

This message has been edited. Last edited by: FP Mod Chuck,


Version 8.2.03
Output : HTML, Excel & PDF
 
Posts: 23 | Registered: April 15, 2019Report This Post
Virtuoso
posted Hide Post
rkiran1

First of all Welcome to Focal Point! I am sorry I missed this post. Usually you will get answers to your questions in this forum but unfortunately no one was able to give you guidance. If this is still an issue please open a case with techsupport and they should be able to help you!


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Virtuoso
posted Hide Post
This can be one way where I call a fex to create a list of value for a Province control based on a change of the Country that is then filled with the values retrieved
var xml03Http = false;
try {
 xml03Http = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
 try {
     xml03Http = new ActiveXObject("Microsoft.XMLHTTP");
 }
 catch (e2) {
     xml03Http = false;
 }
}
if (!xml03Http && typeof XMLHttpRequest != 'undefined') {
 xml03Http = new XMLHttpRequest();
}

function CNTRY_onchange(event) {
  var eventObject = event ? event : window.event;
  var ctrl  = eventObject.target ? eventObject.target : eventObject.srcElement;
  var cont  = IbComposer_getCurrentSelection('CONTINENT');
  var cntry = IbComposer_getCurrentSelection('CNTRY');
  removeAllOptions(PROV);
  addOption(PROV,"Loading...", "_FOC_NULL");
  callProv (cont, cntry);
}

function callProv(cont, cntry) {
 var url = "/ibi_apps/WFServlet?IBIF_ex=lst_prov_all.fex&IBIAPP_app=shared_modules&CONTINENT=" + escape(cont) + "&CNTRY=" + escape(cntry);
 xml03Http.open("GET", url, true);
 xml03Http.onreadystatechange = UpdateProv;
 xml03Http.send(null);
}

function UpdateProv() {
     if (xml03Http.readyState == 4)
     {
         if (xml03Http.status == 200 )
         {
            var responseXML = xml03Http.responseXML;
            var trs = responseXML.getElementsByTagName("tr");
            document.getElementById("PROV").options.length = 0;
            for (r = 0; r < trs.length; r++) {
                var tds = trs[r].getElementsByTagName("td");
                document.getElementById("PROV").options[r] = new Option(tds[1].firstChild.nodeValue, tds[0].firstChild.nodeValue);
            }
            // if only one record mean that only ALL option exist, so do not display
            if (trs.length > 1)
            {
                IbComposer_showHtmlElement('PROV',1);
                // check if only two options exist and if so, then remove the ALL option
                if (trs.length == 2)
                   document.getElementById("PROV").remove(0);
                document.getElementById("PROV").options[0].selected=true;
            }
            else
            {
                removeAllOptions(PROV);
                addOption(PROV,"No Data Found", "_FOC_NULL");
                IbComposer_showHtmlElement('PROV',0);
            }
        }
    }
}


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Member
posted Hide Post
Thank you MartinY


Version 8.2.03
Output : HTML, Excel & PDF
 
Posts: 23 | Registered: April 15, 2019Report 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     [CLOSED] How to pass variable from javascript to fex file

Copyright © 1996-2020 Information Builders