I have a textbox and a button. When I click the button, it sets certain value in the textbox. I want to submit the page whenever the value of the textbox is changed.
Ple
Fire the event manually after setting the value using the change() function.
$(document).ready(function () {
$("input").change(function () {
alert("Changed!");
});
$("#click").click(function () {
$('.set').val('Why am I not getting the alert saying - Changed! ');
$('.set').change(); //Manual fire of event.
});
});
Working Example http://jsfiddle.net/RUdu2/