I have this code, say a.html
<form name="frmSubmit" id="frmSubmit" method="post"> <input type="hidden" name="hdnName" value="user name" /> </form> <script> // 1 : start document.frmSubmit.action = 'b.html'; document.frmSubmit.submit(); // 1 : end // 2 : start document.getElementById("frmSubmit").action = 'b.html'; document.getElementById("frmSubmit").submit(); // 2 : end </script>
Both users 1 and 2 work in IE (IE 8), but not in FF (3.6.10). Firebug gives me the following error:
document.frmSubmit undefined
How can i fix this?
javascript forms
tsurahman
source share