View Single Post
Old 11-30-2012, 12:25 AM   PM User | #2
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,469
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
the .value of a <select> is the currently selected item, lust like an input.
if you submit the form, it should have the selected values in it, just like a hidden input would.

still, for the sake of illustration, here a simplified example of what you are trying to do:

Code:
<form onsubmit=' x.value=sel.value; alert(x.value) '>

 <select id=sel name=sel>
  <option> 1 </option>
  <option> 2 </option>
  <option value='three'> 3 </option>
 </select>

 <input id=x name=x value='-1'>

 <input type=submit>
</form>
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%
rnd me is offline   Reply With Quote