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
Write a query to find the 2nd highest salary of an employee from the employee table?
Is php class name case sensitive?
What is the best way to change the key without changing the value of a php array element?
What are php errors?
What is restful api?
How error handling is being handled by php?
What type of headers that PHP supports?
What are headers in php?
What is the sign to start variables in PHP?
Do you know what is the use of the function 'imagetypes()'?
Explain the purpose of output buffering in php.
Explain whether it is possible to share a single instance of a memcache between multiple php projects?
Explain $_FILES Superglobal Array?
How to process the uploaded files?
How is it possible to propagate a session id?