How can we submit a form without a submit button?

Answers were Sorted based on User's Feedback



How can we submit a form without a submit button?..

Answer / ravindra chouhan

submit a form without a submit button with the help of
javascript code.

Is This Answer Correct ?    35 Yes 3 No

How can we submit a form without a submit button?..

Answer / anand chowdhary

This is the prefect answer:

<html><body>
<form action="what_ever.ext" method="post" name="MyForm">
<input type="hidden" name="hiddenfield1" value="<? echo $some_important_value; ?>">
</form>

<script language="javascript" type="text/javascript">
document.MyForm.submit();
</script>
<noscript><input type="submit" value="verify submit"></noscript>
</body></html>

Is This Answer Correct ?    18 Yes 4 No

How can we submit a form without a submit button?..

Answer / vikas uniyal

We have to use a javascript function:-


<script language="javascript" type="text/javascript">
document.formname.submit();
</script>

Is This Answer Correct ?    13 Yes 0 No

How can we submit a form without a submit button?..

Answer / hitesh shrimali

we can submit form by submit(); function of javascript.

for example:
<form name='xyz' method='post'>
<select name='select' onchange="this.form.submit();">
<option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
</select>
</form>

Is This Answer Correct ?    5 Yes 0 No

How can we submit a form without a submit button?..

Answer / selvabalaji

-Submit a form using javascript onclick fuction.

-Submit a form by selecting a option from drop down box using
onchange event

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More PHP Interview Questions

What is php and what does it do?

0 Answers  


Tell me what should we do to be able to export data into an excel file?

0 Answers  


What are the advantages of stored procedures, triggers, indexes in php?

0 Answers  


Which of the following represents the proper way to set a session variable? Answer: a. $_SESSION['foo'] = 'bar'; b. session_start(); c. session_set_save_handler ('myopen', 'myclose', 'myread', 'mywrite', 'mydelete', 'mygarbage'); d. $foo = $_SESSION['foo']; 2.When administering MySQL, you should make the data directory accessible via the operating system 3.which statement can be used to determine how the optimizer resolves a query

9 Answers   Cybercom, TCS,


Tell me how can you pass a variable by reference?

0 Answers  






What is advanced php programming?

0 Answers  


what is benefit of magento?

0 Answers  


How can I retrieve values from one database server and store them in other database server using PHP?

2 Answers   DRC Systems, Photon,


How to display your correct URL of the current web page?

0 Answers  


Explain what is the use of "echo" in php?

0 Answers  


Explain me what is the goto statement useful for?

0 Answers  


Explain what are psrs? Choose 1 and briefly describe it?

0 Answers  


Categories