How can we submit a form without a submit button?

Answer Posted / saiprasad

<script type="text/javascript">
function submitform()
{
document.forms["myform"].submit();
}
</script>
<form id="myform" action="submit-form.php">
Search: <input type='text' name='query'>
<a href="javascript: submitform()">Submit</a>
</form>

Is This Answer Correct ?    12 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is PHP? Who is the father or inventor of PHP?

603


Do you know what is use of count() function in php?

511


Does mysql need php?

446


What does a dependant variable mean?

553


What is get and post method in php?

518






What are the different ways to login to a remote server? Explain the me, advantages and disadvantages?

530


What function should you use to join array elements with a glue string?

544


Which array function checks if the particular key exists in the array?

487


What is difference between get and post?

511


How to convert strings to upper or lower cases?

553


What is the method to register a variable into a session?

480


Explain the differences between get and post methods?

488


What is mysqli_real_escape_string?

524


What is the purpose of $_ session?

509


How to call javascript function in php on button click?

506