Jump to content

JavaScript Form Anchor


hybrid kill3r

Recommended Posts

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 by Hybrid Kill3r
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...