Websydian v6.1 online documentationOnline documentation - Websydian v6.1

FAQ - How do I get my dropdown boxes to activate an event when value changes

Product Websydian
Version All
Category JavaScripts
Question How do I get my dropdown boxes to activate an event when value changes
Answer

First, create a standard select page.

Second, make the select page a HTMLParentPageGenerator, and create a dynamically populated drop-down combo box (see the instructions on our documentation web site, http://www.websydian.com/websydiandoc/wsyutil/parentchild/otheruses.htm for more information) that holds the possible keys.

Third, to trigger an action when the user selects insert an "onChange" event in the drop-down box, e.g.

onchange="document.MyParentForm.submit();"    (substitute "MyParentForm" with the name of the select event handler).

 

Now, when the user selects a value in the drop-down box, the select form is submitted with the selected value.