I have a form with a text box that has its value changed from a function. How would I create a function based on the value changing from the script and not the user “clicking” or manually changing the value?
I have this:
$(document).ready(function() {
$('#ShippingCost').live({
change: function() {
alert('changed!');
}
});
});
But it only works when a user changes it manually.
You will need to call the change yourself in the code which updates the value:
Changing values through javascript does not fire events.