hi,
I have a simple form in which there is a submit button and and a select (dropdownlist).
I need to get the selected value/index from the select and it always gives me the first value or the index 0. any suggestions what is wrong ?
thanks!
this is the code of the form:
this is the javascript I use to get the values:
I have a simple form in which there is a submit button and and a select (dropdownlist).
I need to get the selected value/index from the select and it always gives me the first value or the index 0. any suggestions what is wrong ?
thanks!
this is the code of the form:
<table border="1"><tr><td>
<select size="1" class="" title="" type="select" id="input_select_1">
<option value="1,4,#,#,#,#,1,2">תמיכה טכנית בטלויזיה</option>
<option value="1,4,#,#,#,#,1,1">תמיכה טכנית בשלט</option>
</select></br>
<input name="input_submit_tv" class="" value="הזמן שיחה" type="submit" />
</td>
</tr>
</table>
this is the javascript I use to get the values:
window.addEvent('domready', function() {
var x=document.getElementById("input_select_1").selectedIndex ;
alert(x);
var y=$('input_select_1').value;
alert(y);