1

How would you use a div to submit a form, for example? Javascript please

0

2 Answers 2

4

Like this:

document.getElementById("ID of form element").submit()
Sign up to request clarification or add additional context in comments.

Comments

0

I have an onchange event attached to a dropdown that does:

this.form.submit();

It's used on an internal utility, so I'm not sure if there is a cross-browser issue, but it's great on IE 7, firefox 3.x, and safari.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.