How can we submit a form without a submit buttom?
Answers were Sorted based on User's Feedback
Answer / arvind pippal(delhi india)
you can call a function in javascript onclick event of any
form element/link and in the function you use any
document.formName.submit(); to submit the form
and above all ans is rights
| Is This Answer Correct ? | 9 Yes | 2 No |
Answer / abhishek anand
Use image element instead submit button
<input type="img" src="img_path/img_name.src">
give the action page name as action attribute in form
element like
<form name="myform' action="myaction.php">
The Image element will work very similar as submit button.
| Is This Answer Correct ? | 8 Yes | 3 No |
Answer / ram gopal verma
<script type="text/javascript">
function validateAndSubmit()
{
if(document.getElementById('user_id').value=='') {
alert('Please enter user id');
document.getElementById('user_id').focus();
}
else
if(document.getElementById('pass').value=='')
{
alert('Please enter password');
document.getElementById('pass').focus();
}else
{
document.form1.submit();
}
}
</script>
<form id="form1" name="form1" method="post" action="action.php" onsubmit="return validate()">
<input type="text" name="user_id" id="user_id" />
<input type="password" name="pass" id="pass" />
<a href="javascript:validateAndSubmit();">Submit Me..</a>
</form>
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ashwani kumar(delhi)
1 Function OnChange();
2. Function OnClick()
| Is This Answer Correct ? | 1 Yes | 3 No |
How to create a mysql connection in php?
Can a php code encryted? Is it possible to execute the php file which is encrypted(without decrypting), if so pleaze tell me the way.
How many ways to include array elements in double-quoted strings using php?
What is meant by pear in php? What is the purpose of it?
What are headers in php?
What is oops php?
how long a default session stay in php?
Sir, I want sbi clearical post model question paper please sent my mail id srinivas_33000@ahoo.co.in
0 Answers State Bank Of India SBI,
if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer
How to get ip address of clients machine?
hi to all i am fresher in php and want to learn php and want a fresher job in php. how to total time i expend to learn php and what is freshers salary.
Do you know is it possible to extend the execution time of a php script?