Topics:
DVR
nvrec
Mplayer
Links
Misc
Commands
Humor
New user
uploaded files
|
(links)-> (Parent)->javascript/jquery trigger input event |
submited by Russell Fri 08 Jun 12 |
This is a hack, I needed to do this because my code would update the value stored in a input textbox, but it didn't trigger the update function that would be called if the user changed the value manually.
This function updates the value of a textbox with the id "party_size" and then triggers the "blur" event that would normally happen if the user changed the value manually.
function update_party(x)
{
var temp = document.getElementById('party_size');
temp.value=x;
var e = jQuery.Event("blur");
$("#party_size").trigger(e);
};
|
Add comment or question...:
|