PDA

View Full Version : How can I replace a URL without opening a new window


hubmandg
07-04-2007, 12:27 PM
:confused:

My understanding is that the code below should not open a new tab or browser. It works fine (no new tab or browser window) on my own machine, but from the web, it always opens a new tab.

Anybody have any ideas why?


function GoToHome()
{
window.location.replace("home.shtml")
}

adamWeiler
07-05-2007, 01:14 AM
(I'm don't have much experience at scripting.)

Anyway, I threw that function up on Geocities and it doesn't open a new window or a new tab. I tried Firefox and IE6.

Also, after the page redirects, it keeps the original URL; I'm not sure if you were going for this.