•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

How can I find the colour of a pixel of an image?

2 Answers   Rushmore Consultancy,


display selected value in dropdown list through javascript without page refresh

5 Answers   ASD Lab,


Is overloading possible in php?

0 Answers  


What distinguishes php from something like client side java script?

0 Answers  


What is the substitution of submit in PHP?

6 Answers   RedAlkemi,


What is the purpose of destructor ?

2 Answers  


Tips to optimize the php script..... Suggestion for exception handling in php...

1 Answers  


Explain do you use composer? If yes, what benefits have you found in it?

0 Answers  


Is php an oop?

0 Answers  


How to download file in php?

0 Answers  


how to get server date and time?

10 Answers  


What is the use of htmlentities in php?

0 Answers  


Categories