Topic awaiting preservation: simple javascript redirect? (Page 1 of 1) |
|
---|---|
Maniac (V) Inmate From: Kah-lee-fohr-nee-ah |
posted 12-26-2004 07:11
Hi all, I've been looking for some code for a simple javascript redirect (an instant redirect, with no delay, no message), but I've found quite a few (differing) examples. code: window.location="www.blah.com";
|
Paranoid (IV) Inmate From: USA |
posted 12-26-2004 07:38
You're better off with using a META refresh. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 12-26-2004 08:56
What he said |
Bipolar (III) Inmate From: Cold Sweden |
posted 12-26-2004 13:04
quote:
|
Paranoid (IV) Inmate From: USA |
posted 12-26-2004 19:18
quote:
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 12-26-2004 23:05
you can always hedge your bets and do both. |
Maniac (V) Inmate From: Kah-lee-fohr-nee-ah |
posted 01-02-2005 22:14
Hey guys, thanks for the advice. I'll probably go with what bit said, and do both a meta refresh and a javascript redirect to be safe. And to answer your question, HZR, in this case, I'm working without server-side scripting capabilities. |
Bipolar (III) Inmate From: Cold Sweden |
posted 01-02-2005 22:47
Since none of the client-side solutions are reliable, include a link to the page also. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 01-02-2005 22:57
Let me give the details on the three methods that you mentioned. The information in this post is stuff that I haven't dealt with for at least a year or so now, so it might not be 100% accurate. |
Bipolar (III) Inmate From: Cold Sweden |
posted 01-03-2005 00:59
JavaScript: The Definitive Guide says that document.location and window.location are synonyms (though document.location was a read-only string in JS 1.0). Also, window.location and window.location.href is equal. |
Maniac (V) Inmate From: Kah-lee-fohr-nee-ah |
posted 01-08-2005 22:38
Thanks, Slime. That was very informative. |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 01-09-2005 18:16
Slime - that really should be a faq, associated with the whole 'how do I redirect using X' faqs. Unfortunatly, I don't have your ->permission to archive this, so kindly turn it into one yourself, cool? |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 01-26-2005 03:53 |