Click to See Complete Forum and Search --> : dynamic select


tjock
04-21-2003, 01:22 PM
Within a form, does anyone know of a way to use the folllowing <select> to pass the option value based on the <option> selected? See ?format=option

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function Start(page) {
OpenWin = this.open(page, "CtrlWindow", "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes");
}
// End -->
</SCRIPT>

<select name="Format">
<option value="Booklet">Booklet</option>
<option value="Brochure">Brochure</option>
<option value="Book">Book</option>
<option value="Exhibit">Exhibit</option>
<option value="Flyer">Flyer</option>
<option value="Invitation">Invitation</option>
<option value="Periodical">Periodical</option>
<option value="Postcard">Postcard</option>
<option value="Poster">Poster</option>
</select>
<input type=button onClick="Start(Format.htm?format=option')" value="View sample publication">

khalidali63
04-21-2003, 01:35 PM
something like this mught help

http://68.145.35.86/skills/javascripts/MultipleListBoxResult3rdListBox.html

DrDaMour
04-21-2003, 05:07 PM
"Start(Format.htm?format=option')" should be

Start(this.form.format.options[this.form.format.selectedIndex].value);


that's assuming your select box and button are within the same Form

tjock
04-22-2003, 08:34 AM
Thanks, that's what I was looking for. Is there a way to append ".htm" to the value?

tjock
04-22-2003, 09:49 AM
Nevermind, I just added the query string to the option value for the pop-up to work on the client, then I strip it out on database insert.

tjock
04-22-2003, 09:58 AM
Actually, I still would like to know - is there a way to append ".htm" to the value?

tjock
04-22-2003, 10:07 AM
Duh, I figured it out-
+ ".htm"