Focal Point
[CLOSED] Linking Parameters In HTMLFORM

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4917002326

August 14, 2012, 05:15 PM
Prince Joseph
[CLOSED] Linking Parameters In HTMLFORM
Hi,

I am creating an html form that will display a couple javascript graphs using !IBI.FIL. That works great. However, I was wondering if there is some way that I can link parameters to a dropdown (that is in the htmlform itself)? I figured that I can populate the dropdown using !IBI.FIL also, but how would i go about linking it to the amper variable?

Here is a quick summary of how I have my code:

TABLE FILE......
..
..
..
WHERE VALUE EQ &VALUE;
ON TABLE HOLD AS HOLD1
END

HTMLFORM -BEGIN

All the html code for creating the graphs (using the data from !IBI.FIL.HOLD1) and the code for creating the dropdown with values that will need to be linked to &VALUE goes in here.

HTMLFORM -END

So, I am trying to figure out how I can link the values in the dropdown to &VALUE so than when I select a new value from the dropdown, it is passed to &VALUE and the fex is reloaded.

Is this possible?

Any help is appreciated.

Thanks,
Prince

This message has been edited. Last edited by: Prince Joseph,


Webfocus 8, All Outputs

August 15, 2012, 09:01 AM
PBrightwell
I think you are trying to do too many things from within one fex. You might try using IFrames and putting your drop down variables in one frame and your graphs in others.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
August 15, 2012, 09:54 AM
J
Hello Prince,

In order to supply amper variables, the syntax is !IBI.AMP.VARNAME;

However, for what you are trying to do, it seems best to have the html file "first" and have a form calling the procedure as an external procedure in the iframe as already suggested. Using an event listener, you can listen for a new selection in the list and when that happens, submit the form and therefore refreshing the frame.

This message has been edited. Last edited by: J,


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
August 15, 2012, 10:03 AM
webFocus_reporter
If I understand your question correctly, you have to default your variable in your fex and bring it on your HTML page using HTML composer and create whatever component you want to creat e.g. drop down, radio button etc. Once you create it, remove all values and save and close document.

Now open that HTML in texteditor and find that component e.g. combobox1 , and put this code after end of tag >,
   
<option value='_FOC_NULL' selected>NONE</option>!IBI.FIL.VARIABLENAME;


This is the way you can link your parameter to fex.
If you are working in Webdevelopment tool, you can copy code from HTML composer and paste it into your customized webpage.

Hope this will help.


WebFOCUS 7.6.X/7.7.X
Windows
all output
August 15, 2012, 11:03 AM
Prince Joseph
Thanks guys for the help. I do think I am trying to do too much in one fex. I am going to look into the iframe route. Lets say I have two iframes, that I am creating using HTMLFORM, how would i go about linking the parameter in one iframe to the other iframe(the one with the graphs) so that the iframe with the graphs would reload with the values for the selected parameter in the other iframe?


Webfocus 8, All Outputs

August 16, 2012, 08:57 AM
PBrightwell
It has been a long time since I've done this and I don't have a way to test it. Basically you run your fex from the iframe with the drop down and you specify where your output goes with the iframe names.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
August 16, 2012, 09:47 AM
Prince Joseph
I just ended up creating the dropdowns in html composer and having them link to an iframe which has the HTMLFORM. I am passing some specific values back and forth between the parent element and child element using javascript. This seems to be working well enough for now. I will look into directing a report from one iframe to another iframe when both iframes are created using HTMLFORM later. Thanks again for everyone's help.


Webfocus 8, All Outputs