View Full Version : Redirecting javascript problem

01-19-2003, 11:35 AM
Hi there

I put the following script in my hello.htm file:

<script language="Javascript">
if(document.referrer.indexOf("://") == -1){
location = "http://myhome.com"}

But I want the "actual" hello.htm file to be shown in a pop out window....rather then redirecting to http://myhome.com

I can' think of how to fix this at this point...because the javascript:openpopup() functions as if I am typing it in the URL in the address bar...

Is here any hint on how to modify this script?

01-19-2003, 06:46 PM
That's confusing. You have this script in "hello.htm", and if the if-statement evaluates to true, exactly the same document shall be opened in popup window? So you have both "hello.html" in the main window and a popup window? Somehow this doesn't make sense to me, perhaps you start again explaining what you want.

And the part with javascript:openpopup() I did not understand at all.