184
rated 0 times
[
185]
[
1]
/ answers: 1 / hits: 27902
/ 10 Years ago, mon, october 27, 2014, 12:00:00
I have a combobox, How to fire onchange event of the combobox and get a selected value from it.
Here is the Code what i did till now :
<select name=g1 id=select_g1>
<option value=one>one</option>
<option value=two>two</option>
<option value=three>three</option>
</select>
<script>
$(document).ready(function(){
$(select_g1).change(function(){
alert(Handled); // alert is not fired up ...
});
});
</script>
EDIT : What if i have more than one combobox :
<select name=g2>
<option value=one>one</option>
<option value=two>two</option>
<option value=three>three</option>
</select>
Also disable the value selected in combobox g1 in combobox g2.
Could anyone please tell me what is wrong with the code.
More From » jquery