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
Explain converting an object?
What should we do to be able to export data into an excel file?
What is csrf token and how will you add csrf token in ajax?
Who created numbers?
What are the data types in php?
Tell me what is the use of "enctype" attribute in a html form?
How can we submit from without a submit button?
Explain me what is the use of header() function in php?
How to include a file code in different files in php?
How do you measure variables?
Is empty java?
How big is nvarchar max?
Is php fully object oriented?
How to get number of days between two given dates using PHP?
What is the purpose of the '.myi' file extension? What do thes file contain?