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
What type of headers that PHP supports?
What are form input html tags?
What is use of mysqli_query in php?
Does php support polymorphism?
What is session in PHP. How to remove data from a session?
Tell me how can we check the value of a given variable is alphanumeric?
What is xss in php?
Explain converting an object?
What is varchar mysql?
Name some of the constants in php and their purpose.
What does php mean?
Write a program to get lcm of two numbers using php?
How to open a file for writing?
How can we submit form without a submit button?
Is facebook still in php?