dynamic select

hi,<br />
<br />
can anybody help me with a simple example of creating a dynamic select menu ?<!--content-->What do you mean by "dynamic select menu" ?<!--content-->Originally posted by renu <br />
hi,<br />
<br />
can anybody help me with a simple example of creating a dynamic select menu ? <br />
Add your own locations. I made dashes to avoid opening an unknown site <br />
<form><br />
<SELECT NAME="list"><OPTION VALUE="JavaScript: noWhere()"><br />
<!-- relative paths to the page you want to link to. --><br />
<VALUE=Select<br />
<OPTION VALUE="http://www.---.com/xyx.htm">XYX<br />
<OPTION VALUE="http://www.---.com/yyy.htm">YYY<br />
<OPTION VALUE="http://www.---.com/zzz.htm">ZZZ<br />
</SELECT><br />
<INPUT TYPE=BUTTON VALUE="Go!" onClick="parent.location= this.form.list.options[this.form.list.selectedIndex].value"><br />
</form><!--content-->By dynamic select I mean that options are not hard coded but are generated every time based on some condition. i.e one time options may be 1, 2, 3 and next time there might be 4 or more options. I will have options in an array so basically I need a loop to generate <option > tag.<!--content-->Originally posted by renu <br />
By dynamic select I mean that options are not hard coded but are generated every time based on some condition. i.e one time options may be 1, 2, 3 and next time there might be 4 or more options. I will have options in an array so basically I need a loop to generate <option > tag. <br />
You might find it here<br />
<!-- m --><a class="postlink" href="http://www.xs4all.nl/~ppk/js/options.html">http://www.xs4all.nl/~ppk/js/options.html</a><!-- m --><!--content-->
 
Back
Top