Hi all,
I need some help i have an HTML page with a form on it.
I simple need a script witch will press the submit button after a while (3 sec for instance)
Thanks in advance
Pressing the submit button after amount of time ?!I need some help with some javascript
Page 1 of 1
7 Replies - 11164 Views - Last Post: 18 July 2007 - 02:57 PM
Replies To: Pressing the submit button after amount of time ?!
#2
Re: Pressing the submit button after amount of time ?!
Posted 18 July 2007 - 06:43 AM
Hi, you posted in the wrong forum cherva I think that you should try HTML/CSS/Javascript forum
#3
Re: Pressing the submit button after amount of time ?!
Posted 18 July 2007 - 07:14 AM
Moved to HTML/Javascript forum.
#4
Re: Pressing the submit button after amount of time ?!
Posted 18 July 2007 - 11:25 AM
Come on no one here can do this ?
#5
Re: Pressing the submit button after amount of time ?!
Posted 18 July 2007 - 11:31 AM
Just use Javascript's setTimeout() function to do something like this:
window.setTimeout("pushSubmit()",3000);
function pushSubmit() {
document.getElementById('myFormID').submit();
}
#6
Re: Pressing the submit button after amount of time ?!
Posted 18 July 2007 - 01:59 PM
I have a little problem here is my code:
And.... it's not working ?!
<form action="/servlet/passportlogin" method="post" name="LogInForm">
<input type="text" name="username" >
<input type="text" name="password" >
<input class="b" id="w100" type="Submit" name="LOGIN_LOGIN" value=" LOGIN ">
</form>
<script LANGUAGE="Javascript">
window.setTimeout("pushSubmit()",3);
function pushSubmit() {
document.getElementById('LogInForm').submit();
}
And.... it's not working ?!
#7
Re: Pressing the submit button after amount of time ?!
Posted 18 July 2007 - 02:20 PM
Probably because you don't have an element with the id set to "LogInForm"?
#11
Re: Pressing the submit button after amount of time ?!
Posted 18 July 2007 - 02:57 PM
My bad I Fixed it there is the full page for the people who will have the same problem and need a working page:
<form action="/servlet/passportlogin" method="post" name="LogInForm" id="LogInForm">
<input type="text" name="username" >
<input type="text" name="password" >
<input class="b" id="w100" type="Submit" name="LOGIN_LOGIN" value=" LOGIN ">
</form>
<script LANGUAGE="Javascript">
window.setTimeout("pushSubmit()",3);
function pushSubmit() {
document.getElementById('LogInForm').submit();
}
This post has been edited by cherva: 18 July 2007 - 03:00 PM
Page 1 of 1

New Topic/Question
Reply



MultiQuote




|