< form name="myform" action="handle-data.php">
Search: < input type='text' name='query' />
< a href ="javascript: submitform()">Search< / a>
< / form>
< script type="text/javascript">
function submitform()
{
document.myform.submit();
}
< / script>
This is a suggestion from VelocityReviews, just change the look of the button:
< input type="submit" value="Submit" style="Border: none; background: none">
I ended up using a hyperlink to an URL that could then be intelligently parsed in my sinatra route, I would have had to have seperate get and post routes any way if I wantyed to stop the form appending ?lots=of&variab=les to the URL.
1 comment:
Post a Comment