Click to See Complete Forum and Search --> : Submit form data by button that is outside of form


black_hawk
07-24-2006, 03:29 PM
Hi friends
I want to send our form data to my php program,but it is necessary to put in my submit button outside of the form that keeps data will be sent.How can i do that?

PineSolPirate
07-24-2006, 03:44 PM
Do an onclick like this:

<html>
<body>
<form name="theForm" action="test.html" method="GET">
<input type="text" name="thing" />
</form>
<input type="button" value="Submit" onclick="document.theForm.submit();" />
</body>
</html>

black_hawk
07-24-2006, 03:58 PM
Thanks PineSolPirate friend, this is the solution:-).
Good works...