redirect via javascript

L

Lee David

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
 
L

Lee David

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 said:
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
 
A

Art X

Would this work ?

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

Might help eliminate some of that back button abuse.

Later, Art.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top