d_barszczak Posted October 8, 2007 Share Posted October 8, 2007 Hi all, I have created a form that i would now like to check over with javascript which i think i know how to do but after that has passed i don't know how to submit the form with a javascript command. Quote Link to comment https://forums.phpfreaks.com/topic/72282-form-submission/ Share on other sites More sharing options...
xenophobia Posted October 9, 2007 Share Posted October 9, 2007 For let say you had a form like below: <form name="form_1" action="abc.php" method="post"> </form> So in your js, you use this to post the form: document.form_1.submit(); Quote Link to comment https://forums.phpfreaks.com/topic/72282-form-submission/#findComment-365198 Share on other sites More sharing options...
d_barszczak Posted October 9, 2007 Author Share Posted October 9, 2007 Thank you xenophobia. Is that cross browers compatible? Quote Link to comment https://forums.phpfreaks.com/topic/72282-form-submission/#findComment-365747 Share on other sites More sharing options...
fenway Posted October 10, 2007 Share Posted October 10, 2007 document.forms['form_1].submit() would be. Quote Link to comment https://forums.phpfreaks.com/topic/72282-form-submission/#findComment-366223 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.