Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Passing in variable or parameter values into a HTML form
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Passing in variable or parameter values into a HTML form
 Login/Join
 
Member
posted
I have a HTML form that has 4 parameter values that are populated in the form with drop down lists that are chained together.

I would like to set and then pass in different values for these 4 parameters based on the user. I have looked in the forum postings and I haven't been able to find anything.

I would like to do as much in App Studio tool as possible.

Can any one share any logic or code on how to do this?

I'm using App Studio in 8.2.01M.

Any help would be appreciated.

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


WF 8.2.01M, MF MVS 7.6.5
 
Posts: 26 | Location: Milwaukee, WI | Registered: September 10, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
One way would be to perform an Ajax call in an "onInitialUpdate" function and then set the drop down list selected value to the value(s) returned.

This can be achieved within the "Embedded JavaScript" tab and, as you're on WF8.2.01 (per your other post), you can make use of jQuery - which is easier.

The question is, do you have JavaScript knowledge or not? If you do, then good. If not, then giving you example code wouldn't help you much because you might not understand what it does.

If you do not have jQuery knowledge (or JavaScript) then I would suggest that is your next step.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, 8.2.02M, 8.2.03, 8.2.04 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.04 standalone on Windows 10 
 
Posts: 5441 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Gold member
posted Hide Post
Are you asking how to populate your variables on load, based on values passed in? If so, then this can be done by passing the amper variables from your URL to the page.

https://servername.com/portalname?country=JAPAN

Then in the Embedded JavaScript, code the following function. You'll also want to trigger this JS function on load in the tasks and animations panel. Take note of the control's unique identifier - in the example below it's edit1 but yours would be whatever your dropdown list name is.


  
function passURLValues(){
  // split up the url following the ? into an array of name=value pairs
  var qStringArray = parent.location.search.split("?");
  var j;


  // loop through the array of name=value pairs and look for "country"
  for (var i=0; i < qStringArray.length; i++)
  {
    // split up each name=value string into name and value
    j = qStringArray[i].split("=");


    // the parm of interest
    if (j[0].indexOf("country") >= 0 )
    {
        //decode value from url
        var parm = decodeURIComponent(j[1]) ;


        //edit box to be populated
        var edit1 = IbComposer_getComponentById('edit1') ;


        //populate edit1 with parm
        edit1.value = parm;
    }
  }
}



WebFOCUS 8.1.05
z/OS
 
Posts: 59 | Registered: May 20, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Passing in variable or parameter values into a HTML form

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.