purplesoup
asked on
Using window.onLoad = or window.onLoad +=
I'm trying to avoid ViewState Mac errors and one of the solutions is to disable the form and re-enable it when the page loads to prevent premature submissions of the form before it has finished loading (see here for a good discussion of the options - http://blogs.msdn.com/b/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx)
To enable the form again the above page has this:
I wasn't sure if this would replace any existing window.onLoad event handlers, and if you are supposed to enter
window.onLoad += enableForm();
and if you are supposed to do this whether it would put "enableForm()" as the first function called after onLoad?
To enable the form again the above page has this:
function enableForm() {
document.getElementById("form").disabled = false;
}
window.onLoad = enableForm();
I wasn't sure if this would replace any existing window.onLoad event handlers, and if you are supposed to enter
window.onLoad += enableForm();
and if you are supposed to do this whether it would put "enableForm()" as the first function called after onLoad?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER