Is it possible to trigger the action of a form with a submit button that's outside the form tags? If so, how should this example be rescripted to make the input tag work outside the form tags?
<html> <body> <form name="input" action="html_form_action.asp" method="get"> First name: <input type="text" name="FirstName" value="Mickey" /><br /> Last name: <input type="text" name="LastName" value="Mouse" /><br /> <input type="submit" value="Submit" /> </form> </body> </html>
Edited by mike_2000_17: Fixed formatting
Here is one example.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <title></title> </head> <body> <form name="myform" id="myform" action="html_form_action.asp" method="get"> First name: <input type="text" name="FirstName" value="Mickey"><br> Last name: <input type="text" name="LastName" value="Mouse"><br> </form> <button onclick="myform.submit();" value="Submit">SUBMIT</button> </body> </html>
Edited by fxm: n/a
Also you don't want to give an input within the form a name="submit", when calling the form's submit function as above, as it will get confused for the forms submit method. As a side note (in case it's not obvious) you can do the above example with any type of element that has an onclick event.
I have published an HTML site from my network drive in my office. I need to put a section where people can leave comments. I tried to read on that as I don't know much about HTML. Can someone help me creat a blog kinda stuff for my HTML site?
try form width:auto;
I'm having a problem with the program i did.
The problem is ;
It says that the conversion ( for the grade part , the ones with '+' and '-') ...
I have recently been using XAMPP for dev. Although I'm new to XAMPP, the recent issue sprung up surprisingly, the simple script running a day before.
The script is just ...
Im trying to make a program that shifts all my elements of array to the right by one and move the last element
into the first position.how would i move ...