Click to See Complete Forum and Search --> : Submitting form with select box values


bddosch
04-23-2003, 09:35 AM
<a href="javascript:changeFormValues('blueBalls','0014','12.99');">add to basket</a>

This is a link that I use to submit values to a javascript, now each of these values are set, but I want to add to them another value wich could be selected in a select box like

<select name="sBox" id="sBox">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>

So when I select 1 from the options I want it to be sent along with these other values.

Something like this,

<a href="javascript:changeFormValues('blueBalls','0014','12.99','1');">add to basket</a>

khalidali63
04-23-2003, 02:43 PM
I am not a big fan of inline javascript,however if you must then you can acieve what you are trying to by this,
assuming that your forms name is "form1" and the listbox's name is "sBox"

<a href=" java script:changeFormValues('blueBalls','0014','12
.99',document.form1.sBox.options[document.form1.sBox.selectedIndex].value);">add to basket</a>