views:

194

answers:

2

Hello,

On my page I have toolbar which comes from Masterpage, and some input fields. All input fields are inside of tag form and toolbar outside tag form. Is it possible submit form after pressing on button outside of form tag?

Please suggest, Alexander.

+2  A: 

You can do it with JavaScript:

<input type="button" onclick="$('#someForm').submit();" />

The disadvantage, of course, is that it breaks without JavaScript.

I don't believe you can do what you ask without JavaScript, though.

Craig Stuntz
Isn't there a nested double quote problem in the above?
klausbyskov
Yes; thanks. Fixed.
Craig Stuntz
Thanks,It works for me
Alexander Shapovalov
+2  A: 

Use the OnClick-event of the button to submit the form, f.e.:

<INPUT TYPE=BUTTON OnClick="document.formname.submit();" VALUE="Submit">
Marty McVry