Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > redirect via javascript

Reply
Thread Tools

redirect via javascript

 
 
Lee David
Guest
Posts: n/a
 
      06-04-2005
I want to redirect anyone going to one site to another site. I have a
"windows.open" on the original site and that opens a new browser, but what I
want it the old one to be replaced (or at least go way once they are
redirected).

How do I do this?

TIA,
Lee


 
Reply With Quote
 
 
 
 
VK
Guest
Posts: n/a
 
      06-04-2005
document.location.href = newURL;

 
Reply With Quote
 
 
 
 
Michael Winter
Guest
Posts: n/a
 
      06-04-2005
On 04/06/2005 17:51, Lee David wrote:

> I want to redirect anyone going to one site to another site.


Then use a server-side redirect. It's reliable, friendly to all user
agents, and doesn't break the Back button.

See <URL:http://www.w3.org/QA/Tips/reback>.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
 
Reply With Quote
 
Lee David
Guest
Posts: n/a
 
      06-05-2005
Unfortunately, that didn't work.

I appreciate the response, however.

Lee

"VK" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> document.location.href = newURL;
>



 
Reply With Quote
 
Lee David
Guest
Posts: n/a
 
      06-05-2005
Thank you, that worked. Unfortunately, the cite gave an example of what not
to do, but none of what to do. But I made an assumption and it seemed to
work.

BTW, I couldn't find it in 'JavaScript The Definitive Guide' by O'Reilly. I
really to try to find the answer before I ask the question. Neither the
"redirect" nor the "refresh" were in the definitive guide.<g>

Lee

"Michael Winter" <(E-Mail Removed)> wrote in message
newsvmoe.45307$(E-Mail Removed). uk...
> On 04/06/2005 17:51, Lee David wrote:
>
>> I want to redirect anyone going to one site to another site.

>
> Then use a server-side redirect. It's reliable, friendly to all user
> agents, and doesn't break the Back button.
>
> See <URL:http://www.w3.org/QA/Tips/reback>.
>
> [snip]
>
> Mike
>
> --
> Michael Winter
> Replace ".invalid" with ".uk" to reply by e-mail.



 
Reply With Quote
 
Michael Winter
Guest
Posts: n/a
 
      06-05-2005
On 05/06/2005 02:58, Lee David wrote:

[MW:]
>> See <URL:http://www.w3.org/QA/Tips/reback>.

>
> Thank you, that worked. Unfortunately, the cite gave an example of what not
> to do, but none of what to do.


It provides links to other documents that describe how to implement
server-side redirects for a selection of systems.

Mike


In future, please do not top-post.
<URL:http://www.faqs.org/docs/jargon/T/top-post.html>

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
 
Reply With Quote
 
Art X
Guest
Posts: n/a
 
      06-06-2005
Would this work ?

window.location.replace("newpage.html");

Might help eliminate some of that back button abuse.

Later, Art.

 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      06-16-2005
VK wrote:

> document.location.href = newURL;


You have already read that `document.location' is deprecated long since.


PointedEars
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Response.redirect does not redirect from .aspx page =?Utf-8?B?VHJveQ==?= ASP .Net 3 10-15-2008 09:07 PM
Redirect via web.config CK ASP .Net 1 07-10-2006 11:29 PM
Redirect to secure FTP site via response.redirect Ron Howard ASP General 2 08-11-2004 07:40 PM
Nixing Javascript via javascript: pseudoproto? bill Javascript 2 07-08-2004 11:37 AM
Basic Q - Response.Redirect, all redirect to first Response.Redirect statement Sal ASP .Net Web Controls 1 05-15-2004 03:46 PM



Advertisments