View Full Version : Simple window.open Question

07-07-2004, 10:27 PM
This code is opening the url in a new window just as I want, but leaving the old window blank except for the message [object] in it.

<a href="javascript:window.open('http://www.xxx.com')">Click Here to Open New Window</a>

Thanks, Peter

07-07-2004, 10:46 PM
<a href="javascript:window.open('http://www.www.com');void(0);">Click Here to Open New Window</a>

That just opens a default page...that being the case, why don't you just use a standard anchor...?

Maybe, you can use this:



07-07-2004, 11:02 PM
I'm not sure what you're saying. Don't know what you mean by standard window... but I don't care about the dimensions. I just don't want it to open in MY window and replace my site.

Elsewhere I use this code and it works fine:

if (V==1222){window.open('http://www.xxx.com/')}

But I want it to be in an href statement.

(Of course the real url isn't xxx.)

Thanks, Peter

Willy Duitt
07-07-2004, 11:07 PM
Try searching this forum.
There are hundreds of popup scripts and/or examples which show how to do what you are asking...