How can we submit a form without a submit button?
Answer Posted / snc
We can use a simple JavaScript code linked to an event
trigger of any form field. In the JavaScript code, we can
call the document.form.submit () function to submit
Example 1
<form method='post' action='some_action'>
<select name='something' onchange=‘this.form.submit () ;'>
<option value='1'>1</option>
<option value='2'>2</option>
</form>
Example 2
<form method='post' action='something'>
<input type='checkbox' name='something'
onclick=‘this.form.submit ()'>
</form>
| Is This Answer Correct ? | 4 Yes | 8 No |
Post New Answer View All Answers
How to parse configuration file in php?
What are helpers in php?
What is a path Traversal?
What is the current php version?
Why php is also called as scripting language?
How the values are ordered in an array?
What is the use of namespace in php?
What is the $_ server php_self variable?
Tell me what is the importance of "action" attribute in a html form?
What is the use of hooks?
What is the function of string in c?
What is php addslashes?
Difference between mysql_connect and mysql_pconnect?
How can I make a script that can be bilingual (supports english, german)?
What is implode() in php?