Forum Moderators: open
I use JavaScript in HTML form to disable Submit button while submitting form. In next page user get result of submitted form and he/she can click Back button in browser to submit another form. The problem is in FireFox, when user return to form using Back button he/she get disabled submit button from previous submit.
Also all data in form remain from previous fill.
Any suggestion how to clear state in form? In IE everything works fine, clear form on Back button.
Tomas
It is definately the onload handler clearing the form as, without it, the previous data is still in the input box.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<HEAD><script type="text/javascript">
function trydis()
{
document.forms["thing"].reset();
}
</script>
</HEAD>
<BODY onunload="trydis()">
<form name="thing" method="post" action="test.html">
<input name="something" type="text" >
<input type="submit" value="submit">
</form>
</body></html>