hybrid kill3r Posted July 29, 2012 Share Posted July 29, 2012 (edited) I want to be able to submit a form with a javascript anchor. I am using getElementById to submit the form, but how do I pass the arguement through that function? I've tried using single quotes and double quotes around "my-form" to pass it but it doesn't work. <a href="javascript::document.getElementById('my-form').submit();">Submit Form</a> Edited July 29, 2012 by Hybrid Kill3r Link to comment Share on other sites More sharing options...
dsonesuk Posted July 29, 2012 Share Posted July 29, 2012 try <a href="javascript:void()" onclick="document.getElementById('my-form').submit();">Submit Form</a> Link to comment Share on other sites More sharing options...
eTianbun Posted July 29, 2012 Share Posted July 29, 2012 <a href="javascript::document.getElementById('my-form').submit();">Submit Form</a> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now