views:

48

answers:

2

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

+4  A: 

Like this:

document.getElementById("ID of form element").submit()
SLaks
A: 

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.