Say I have:
<form method="get" action="something.php">
<input type="text" name="name" />
</form>
<input type="submit" />
How do I go about submitting that form with that submit button outside of the form, I think in HTML5 theres an action attribute for the submit but I’m not sure if thats fully cross-browser and if it isn’t is there anyway to do this?
Update: In modern browsers you can use the
formattribute to do this.As far as I know, you cannot do this without javascript.
Here’s what the spec says
That’s my bold
A
submitbutton is considered a control.http://www.w3.org/TR/html4/interact/forms.html#h-17.2.1
From the comments
Why not place the
inputinside the form, but use CSS to position it elsewhere on the page?