By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,253 Members | 1,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,253 IT Pros & Developers. It's quick & easy.

Autosubmit failing....

P: n/a
Hello all,
I'm trying to automate the submission of a page after a specific
amount of time, but each of the attempts below do not work. Any ideas
would be great -

Thanks,
Christine

function Timer() {
window.status="";
gTimerCount--;
if (gTimerCount > 0)
{
if (gTimerCount == 300) TimeWarning();
window.status = "Time Remaining: " +
ConvertNum(gTimerCount);
gTimer=window.setTimeout("Timer()",1000);
}
else{
window.document.form.submit.click();}
// document.form.submit.click();}
// document.form.submit();}
}
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Lee
Christine said:

Hello all,
I'm trying to automate the submission of a page after a specific
amount of time, but each of the attempts below do not work. Any ideas
would be great -


Unless your form is named "form", you can't refer to it as document.form.
Assuming it's the first (probably only) form on the page, this should work:

document.forms[0].submit();

Jul 20 '05 #2

P: n/a
Lee <RE**************@cox.net> wrote in message news:<c0********@drn.newsguy.com>...
Christine said:

Hello all,
I'm trying to automate the submission of a page after a specific
amount of time, but each of the attempts below do not work. Any ideas
would be great -


Unless your form is named "form", you can't refer to it as document.form.
Assuming it's the first (probably only) form on the page, this should work:

document.forms[0].submit();

Thanks, that did it!
--Christine
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.