•How can we submit a form without a submit button
Answers were Sorted based on User's Feedback
Answer / sei thu htun
You can use single button and use javascript for submit
eg.
<script type="text/javascript">
function submitform()
{
document.getElementById("your_form_id").submit();
}
</script>
//in html form
<input type="button" value="Submit" onclick="submitform();"/>
Is This Answer Correct ? | 22 Yes | 2 No |
Answer / bharat pradhan
<script type="text/javascript">
function pick()
{
document.form1.action="submit.php";
document.form1.submit();
}
</script>
<form name="form1" id="form1" method="post" onsubmit="pick()">
<input type="text" name="T1" id="T1">
</form>
Is This Answer Correct ? | 8 Yes | 3 No |
Answer / prantik gautam
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<title>submit a form without a button</title>
</head>
<body ondblclick="document.frm_nm.submit();">
<form action="" method="post" name="frm_nm">
<input type="text" id="txt" size="25"/>
</form>
</body>
</html>
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / tejash gajjar
You can use single button and use javascript for submit
eg.
<script type="text/javascript">
function submitform()
{
document.getElementById("your_form_id").submit();
}
</script>
//in html form
<input type="button" value="Submit" onclick="submitform
();"/>
Is This Answer Correct ? | 2 Yes | 1 No |
What is putenv?
What are interfaces in php?
What types images that php supports?
How cookies are transported from servers to browsers?
What is a trait in php?
What advance thing in php7?
Tell me what is htaccess? Why do we use this and where?
Hello Friends,I am seeking for a job in php having 2yrs. exp.Please suggest any company openings.
What are the current versions of apache, PHP, and mysql?
Are react hooks stable?
What is button in html?
Tell me what are the different types of errors in php?