March 10, 2008, 04:08 PM
Noelparameter passing
Is it possible to pass parameters from one html file to another html or fex?
Here is the flow on how the process works.
HTML1 ------> Fex1------->HTML2------>Fex2
Company Company Company Company
Warehouse Warehouse Warehouse Warehouse
FromDate FromDate FromDAte FromDate
Todate Todate Todate Todate
Thanks again for the help!
March 10, 2008, 04:20 PM
TravThe short answer is yes. Basically what you have to keep in mind is that HTML layouts can access amper variables via JavaScript methods. The syntax in JS to access a variable &CAR would be something like:
var car = "!IBI.AMP.CAR;";
You could then use that "car" JS variable to do whatever you want. One thing that we have found though is that your HTML layout needs to be opened via a fex -- you can use the "-HTMLFORM" command to do this.
That should get you started -- I've got a more detailed example, so let me know if you can't figure it out from there.
March 10, 2008, 04:33 PM
NoelHi Trav,
Thanks for the reply.
Now I can access my variable at HTML2 but now my problem is how am i going to pass it to my fex2.
Thanks again.
March 10, 2008, 04:43 PM
TravAt that point, it's just a plain ole parameter pass to a fex -- just like how you passed it to fex1 from html1. You'll have to have JS populate some control that you're using for a parameter -- but it doesn't matter whether it's a visible parameter or hidden...
Basically set up HTML2 so it works independently, and then simply set the value of the right control via JS in the onload of the window.
March 11, 2008, 04:22 AM
GamPProvided you call the htmlp age from within your fex using the -HTMLFORM statement, you can use the !IBI.AMP.name; technique anywhere in your html page. The example that Trav gave can also be used to populate form-variables, or to just present plain text or whatever you want to do with the variable.
Using it in a < input > tag to populate a form-variable will automatically make the variable available in the fex called from the form action.