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 arrays are passed through arguments?
What is php.ini & .htacess file?
What is the use of friend function in php?
What are php magic methods?
What exactly is PHP?
How is it possible to know the number of rows returned in the result set?
Name some of the functions in php.
Can you convert php to html?
Which method do you follow to get a record from a million records? (Searching not from database, from an array in php)?
Should I learn php before wordpress?
What is the difference between explode() and split() functions?
What is the difference between single-quoted and double-quoted strings in php?
How to register a variable in PHP session?
What is the correct syntax of mail() function in php?
Tell me what are the different types of errors in php?