Click to See Complete Forum and Search --> : setting timeout for document.write command


cmotor
09-08-2003, 07:35 PM
I am having a problem with the script below. I performs the document.write command fine, but the form is not submitting. I think the page is changing before the form has a chance to submit. I'd like to try using the timeout command so that the document.write command waits a second or two.

How would I do that. Or does anyone have another idea?

Thanks,
-cmotor


else
{document.Returnform.submit()

document.write('<span style="font-family:arial; font-size:18px; color:#990000; font-weight:900;">Name: ', document.Returnform.customer_name.value, '</span>')

pyro
09-08-2003, 08:09 PM
Something like this:

<script type="text/javascript">
function writeText() {
document.write("Hello World");
}
setTimeout("writeText()",2000);
</script>