A
Anonymous
Which is the correct approach to disable buttons when leaving an aspnet
page?
Currently I have the following html, which disables buttons when pressing F5
in FireFox, which ofcourse can occur before leaving the page.
<html>
<body onbeforeunload="document.getElementsByTagName( 'input' )[0].disabled =
true">
<form name="form1" method="post" action="Default.aspx" id="form1">
<input type="submit" name="Button1" value="With FireFox, this button gets
disabled when pressing F5. Not so in IE." id="Button1" />
</form>
</body>
</html>
page?
Currently I have the following html, which disables buttons when pressing F5
in FireFox, which ofcourse can occur before leaving the page.
<html>
<body onbeforeunload="document.getElementsByTagName( 'input' )[0].disabled =
true">
<form name="form1" method="post" action="Default.aspx" id="form1">
<input type="submit" name="Button1" value="With FireFox, this button gets
disabled when pressing F5. Not so in IE." id="Button1" />
</form>
</body>
</html>