WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Simple JS question, Guillermo, March 10, 2004
     Re:Simple JS question, iDRiS, March 10, 2004
         Re:Simple JS question, Guillermo, March 11, 2004

Subject: Re:Simple JS question From: iDRiS Date: March 10, 2004

Have you tried document.location = whereTo;
? That might work...

-iDRiS

From: Guillermo
Sent: March 10, 2004
Subject: Re:Simple JS question

I'm using this simple js function:

function link(whereTo) {
 document.location.replace(whereTo);
}

and then:

<div onclick="link('my_page.html');">Click me!</div>

Now, it seems that the location.replace does not behave like a regular link, because when I click the "Back" button in my browser, it doesn't go back to the previuos page, it goes to the first available page in the browser's history, wich is not always the one with the div.

What should I use in order to this to work properly and cross-browser (right now, it only works in ie).





Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX