When my document is ready I do the following:
$(document).ready(function () {
$('#ReferenceID').change(function () { reLoad(); });
});
However I would also like to trigger an execution of the reLoad() function when the document
becomes ready.
How can I call that function?
Inside reLoad() I would like to have something to put up a message showing the word “Loading”. Something like jQgrid when it loads data. Is that easy to do?
If I’ve understood you correctly, then all you need to do is call the function in the
readyevent handler:Note that if you don’t need to do anything else in the
changeevent handler, and you don’t need to pass any arguments toreLoad, you could just pass a reference toreLoadto thechangemethod: