Focal Point
Problem of loading the dropdown dynamically based on value passed from previous page.

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

March 03, 2011, 12:29 AM
Srinivas429
Problem of loading the dropdown dynamically based on value passed from previous page.
Hi,

I have two html pages. In first one, I have input textbox. Once user enters value and click on submit, this value should pass to second page. In the second page I have a dropdown which is loading using another procedure. Now how can I pass the textbox value to the procedure. I want the dropdown values to be loaded based on the selected textbox value.

Any help will be greately appreciated.

Thanks in advance,
Webfocus 7.6.9.
March 03, 2011, 04:49 AM
GamP
If there is a procedure executed in between the two html pages, then the procedure will automatically receive the user-entered text from the text input if the call is performed using a form.
Since you want the dropdown on the second page to conform to the entered selection, I think you indeed need a procedure in between, so it should not be a problem.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
March 03, 2011, 05:58 AM
Ramkumar - Webfous
Inject the Value from the previous page to an XML fex in the next page, wont work.

Someway try out Cookies....


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
March 03, 2011, 06:51 AM
Ramkumar - Webfous
This Might Help You.

Please go through the above link for more stuff....


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
March 03, 2011, 10:50 AM
<FreSte>
Hi,

Below you'll find 2 very basic HTML-pages.

<!-- page1.htm -->
<html>
<script>
function loadNextPage() {
  var _value = document.getElementById("value2Submit").value.toUpperCase() ;
  window.open("page2.htm?" + _value);
}
</script>
<body>
Value to submit (A,B,C,D,E) = <input type="text" id="value2Submit">
<br><br>
<input type=button value="Submit" onclick=loadNextPage()>
</body>
</html>


<!-- page2.htm -->
<html>
<script>
function getSubmittedValue() {
  var _submittedValue = location.search.substring(1,99);
  var _obj = document.getElementById("selbox1");
  for (var i=0; i<_obj.length; i++) {
    if (_obj[i].value == _submittedValue) {
      _obj[i].selected = true;
      return;
    }
  }
}
</script>
<body onload=getSubmittedValue();>
<select size=5 id="selbox1">
  <option value="A">Text A</option>
  <option value="B">Text B</option>
  <option value="C">Text C</option>
  <option value="D">Text D</option>
  <option value="E">Text E</option>
</select>
</body>
</html>

March 04, 2011, 05:16 AM
Srinivas429
Thanks all.

The above link helped me to resolve the issue.

Once again thanks for your valuable suggesions.

Regards,

Srinivas
March 07, 2011, 03:52 AM
Ramkumar - Webfous
Hi Srinivas,

Happy that your issue is resolved. Mark this as Solved.


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5