I have the following code
alert("Submit the form");
document.form[0].action = "contact_form3.asp?proc=true";
alert("action changed?");
document.form[0].submit();
For the life of me I cannot get it to change the action to the one shown aboove. It just continues to go to contact_form3.asp ans that’s it.
The first alert occurs, but then it is submitted.
Help appreciated and let me know if you need to see more example.
Try
document.forms[0](with forms in plural) instead ofdocument.form[0].