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
Is php a case sensitive language?
Is php coding easy?
What is the role of the .htaccess file in php?
Php code to find whether a number armstrong or not?
What is session and why do we use it?
Explain some most commonly use string functions in php?
How to create a web form?
How do you check is php not empty?
Is age nominal or ordinal?
How can I convert ereg expressions to preg in php?
What does trim () do in javascript?
Do you know what is the use of rand() in php?
How do I escape in php?
Tell me what are the __construct() and __destruct() methods in a php class?
What is the use of array_count_values() in php?