|
 |
|
Dev Articles Community Forums
> Programming
> ASP Development
|
How I can auto submit form?
Discuss How I can auto submit form? in the ASP Development forum on Dev Articles. How I can auto submit form? ASP Development forum discussing your ASP or Visual Basic problems, solutions and code posts. Active Server Pages help you create dynamic websites using powerful scripting technologies.
|
|
 |
|
|
|
|

Dev Articles Community Forums Sponsor:
|
|
|

September 9th, 2004, 02:40 AM
|
|
Registered User
|
|
Join Date: Sep 2004
Posts: 6
Time spent in forums: 4 m 29 sec
Reputation Power: 0
|
|
How I can auto submit form?
I want to auto submit form.
After all the script in page run. Or after the specified time.
Please Help
|

September 11th, 2004, 11:26 AM
|
|
Registered User
|
|
Join Date: Sep 2004
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
I assume you're using javascript, and don't want the user to use a SUBMIT button. Otherwise,
you'd put 'onSubmit="return scriptname()"' in the HTML FORM tag where the named script ends
with 'return true'. (or 'return false', to abort it!)
Otherwise, you can submit the form anytime with the script statement 'document.formname.submit()'
where the FORM tag includes ID="formname". If you want to execute this statement after a specified
time, execute the script statement 'timername=setTimeout("functionname()",<milliseconds>)',
where the named function contains the statement above. If you need to abort the timeout in your
code, execute 'clearTimeout(timername)'.
|

September 11th, 2004, 12:14 PM
|
|
Registered User
|
|
Join Date: Sep 2004
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Correction!
Minor correction to my last posting - See the script below for the
correct object reference syntax for the SUBMIT method!
(I tested this one!)
<html>
<head>
<title>TEST</title>
</head>
<body>
<form ID="fname" action="/aspapps/logscr.asp">
</form>
<SCRIPT LANGUAGE="Javascript">
<!--
document.forms("fname").submit()
//--></SCRIPT>
</body>
</html>
|

January 24th, 2013, 09:02 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 2
Time spent in forums: 18 m 57 sec
Reputation Power: 0
|
|
Here is a working auto-submit method: when page is loaded, it will the form will be immediately autosubmited (the values can be set with php variables).
Code:
<form action="page.php" method="post">
<input type="text" name="example1" value="<?php echo $_POST['something1'];?>" />
<input type="text" name="example2" value="ANOTHER_YOUR_VALUE" />
<input type="submit" />
</form>
<SCRIPT LANGUAGE="JavaScript">document.forms[0].submit();</SCRIPT>
for example, the $_POST['something1'] value is received from the previous real-user submited Form, and this form can add another input with ANOTHER_YOUR_VALUE.
___________
|

January 24th, 2013, 11:19 PM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 7
Time spent in forums: 52 m 32 sec
Reputation Power: 0
|
|
|
just tell me about how we can compare two text-box that if both are same then go ahead otherwise error.
|

February 24th, 2013, 10:00 AM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 1
Time spent in forums: 8 m 46 sec
Reputation Power: 0
|
|
|
the form should be inserted inside body, and script can be execution body. so when page is loaded, it will be immediately executed:
Code:
<html><head></head>
<body>
<form action="page.php" method="post">
<input type="text" name="example1" value="blabla" />
<input type="submit" />
</form>
</body>
<SCRIPT LANGUAGE=JavaScript>document.forms[0].submit();</SCRIPT>
</html>
Here is a working auto-submit method: when page is loaded, it will the form will be immediately autosubmited (the values can be set with php variables).
Code:
<form action="page.php" method="post">
<input type="text" name="example1" value="<?php echo $_POST['something1'];?>" />
<input type="text" name="example2" value="ANOTHER_YOUR_VALUE" />
<input type="submit" />
</form>
<SCRIPT LANGUAGE="JavaScript">document.forms[0].submit();</SCRIPT>
for example, the $_POST['something1'] value is received from the previous real-user submited Form, and this form can add another input with ANOTHER_YOUR_VALUE.
|

April 11th, 2013, 03:03 AM
|
|
Registered User
|
|
Join Date: Apr 2013
Posts: 2
Time spent in forums: 8 m 55 sec
Reputation Power: 0
|
|
|
I assume you're using javascript, and don't want the user to use a SUBMIT button.
|

May 4th, 2013, 02:12 AM
|
|
Registered User
|
|
Join Date: May 2013
Posts: 2
Time spent in forums: 5 m 34 sec
Reputation Power: 0
|
|
|
Minor correction to my last posting - See the script below for the
correct object reference syntax for the SUBMIT method!
|

May 4th, 2013, 09:55 PM
|
|
Registered User
|
|
Join Date: May 2013
Posts: 3
Time spent in forums: 4 m 32 sec
Reputation Power: 0
|
|
|
just tell me about how we can compare two text-box that if both are same then go ahead otherwise errorURLURLURLURL
|

May 23rd, 2013, 03:12 AM
|
|
Registered User
|
|
Join Date: May 2013
Posts: 5
Time spent in forums: 6 m 20 sec
Reputation Power: 0
|
|
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|