•How can we submit a form without a submit button

Answers were Sorted based on User's Feedback



•How can we submit a form without a submit button..

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

•How can we submit a form without a submit button..

Answer / creatore

simple use javascript
document.form_name.submit();

Is This Answer Correct ?    12 Yes 2 No

•How can we submit a form without a submit button..

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

•How can we submit a form without a submit button..

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

•How can we submit a form without a submit button..

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

Post New Answer

More PHP Interview Questions

What is putenv?

0 Answers  


What are interfaces in php?

0 Answers  


What types images that php supports?

1 Answers  


How cookies are transported from servers to browsers?

0 Answers  


What is a trait in php?

0 Answers  






What advance thing in php7?

0 Answers  


Tell me what is htaccess? Why do we use this and where?

0 Answers  


Hello Friends,I am seeking for a job in php having 2yrs. exp.Please suggest any company openings.

1 Answers  


What are the current versions of apache, PHP, and mysql?

21 Answers  


Are react hooks stable?

0 Answers  


What is button in html?

0 Answers  


Tell me what are the different types of errors in php?

0 Answers  


Categories