WolfShade
10-16-2003, 04:22 PM
I'm trying to get a form full of TYPE="HIDDEN" to automatically submit after the page loads (it's for an internal application that generates a PDF based upon the form fields.)
The problem is that the function I'm using has been used in other pages with a 50/50 chance of it working. In this case, it's one of those that isn't working and I can't figure out why.
Here is the code I'm using, followed by the error message that I'm getting:
function getPDF() {
df = document.FormOne;
df.action = "generatePDF.asp";
df.method = "post";
df.submit();
}
setTimeout("getPDF()",3000);
Error: Object doesn't support this property or method
(Specifically points to "df.submit();")
Any ideas as to why this sometimes works and sometimes won't?
The problem is that the function I'm using has been used in other pages with a 50/50 chance of it working. In this case, it's one of those that isn't working and I can't figure out why.
Here is the code I'm using, followed by the error message that I'm getting:
function getPDF() {
df = document.FormOne;
df.action = "generatePDF.asp";
df.method = "post";
df.submit();
}
setTimeout("getPDF()",3000);
Error: Object doesn't support this property or method
(Specifically points to "df.submit();")
Any ideas as to why this sometimes works and sometimes won't?