Forum Moderators: open

Message Too Old, No Replies

redirect OnLoad

but i want a 3sec delay

         

stef25

7:42 pm on Jun 27, 2004 (gmt 0)

10+ Year Member



using the following script from dreamweaver MX. How can i insert say a three second delay?

i want the surfer to read a thank you message after a form submission, but then get redirected back home

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>

Bernard Marx

8:55 pm on Jun 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have no idea what that code is doing at all.
How about:

setTimeout("window.location.href = '_whatever_url_'", _delay_in_millisecs_)

Rambo Tribble

10:12 pm on Jun 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have no idea what that code is doing at all.

I have a sneaking hunch that is MM's intention. All their generated scripts make a bowl of spaghetti look as linear and orderly as a telephone line.

And let's not forget the HTML refresh header:

<meta http-equiv="Refresh" content="3; URL=home.html">

Bernard Marx

11:27 pm on Jun 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That meta sounds betta.