How do i redirect to the previous page after 5 seconds?
is300
6:36 pm on Feb 12, 2004 (gmt 0)
Here's what I have so far, everything is right except for redirURL line. I'm not sure what it should =
<SCRIPT LANGUAGE="JavaScript"> <!-- Begin redirTime = "5000"; redirURL = "history.back(1)"; function redirTimer() { self.setTimeout("self.location.href = redirURL;",redirTime); } // End --> </script>
THANK YOU SO MUCH!
isitreal
7:46 pm on Feb 12, 2004 (gmt 0)
If you want it to go back try this:
redirURL = window.history.go(-1);
If it works with that, you're done, if it doesn't, you might need to make a little function to call in the settimeout instead of having the actual code in there.
is300
9:21 pm on Feb 12, 2004 (gmt 0)
It didn't work....but thank you.
I'm no expert at writing functions. I know how to integrate existing scripts, but thats as far as I can go with javascript...as i'm actually photographer. any other ideas?
is300
9:24 pm on Feb 12, 2004 (gmt 0)
I forget to mention that when i put your redirURL = window.history.go(-1); in, it seems to redirect immediately rather than delaying. i really need the delay.
isitreal
10:04 pm on Feb 12, 2004 (gmt 0)
You're right, it doesn't work, I'll see if I can figure that out.