<select id="paymenttype">
<option value="">---Select---</option>
<option>100</option>
<option>200</option>
<option>300</option>
<option>400</option>
<option>500</option>
</select>
<input type="text" id="check" value="" readonly/>
<input type="text" id="update" value="" />
JS
$("#paymenttype").change(function(){
$("#check").val($('#paymenttype option:selected').text());
});
$("#check").change(function(){
alert("soul");
$("#update").val(0);
});
As shown in the code $("#check").change(function() it doesn’t work? what function should i use in order to Jquery work? when there is change in the input text box check i am going to add? this is just an example
You just need to manually fire the change event when you set the value:
http://jsfiddle.net/infernalbadger/e6yEd/7/
You could add a tiny plugin so you can set the value and fire the change event at the same time in a single call.
This way you just call
$("#check").changeVal($('#paymenttype option:selected').text());:http://jsfiddle.net/infernalbadger/e6yEd/11/