Focal Point
[SOLVED] Changing a variable in a fex file through javascript

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

June 18, 2019, 11:16 AM
ccollier
[SOLVED] Changing a variable in a fex file through javascript
I am working on an HTML page that receives a value from one of 2 elements. The user switches between those 2 elements with a radio button, making one element disappear and the other one appear. The only problem is, when the element is changed, the value variable in the fex file isn't changed until you select something from the element that just appeared. Is there a way to update the variable inside the fex file to take on the value of the element once it appears?

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


WebFOCUS 8.2.01M on Windows 10
June 18, 2019, 01:58 PM
Fernando
You not only need to make the element appear, you also need to make the element selected. There are javascript functions to do that for elements.

Example:
  var arr=[];

  arr.push('_FOC_NULL');
  IbComposer_setCurrentSelection('radio1', arr, false);
  


Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
June 18, 2019, 02:02 PM
ccollier
I figured out that the easier way to solve the problem was to use a hidden element and pass the value of one of the 2 elements into it via javascript depending on which radio button was selected.


WebFOCUS 8.2.01M on Windows 10