Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Open new window from pop-up



12:13 pm on Jan 28, 2005 (gmt 0)

10+ Year Member


Got this small problem, I'm having some trouble with pop up windows.

What I have is a pop up window, and in that you have a link which points to another site, but I would like to open a new browser window.

Any ideas?

<a href="http://domain.com/" onclick="window.open("","scrollbars=yes,width=750,height=580");return true;">Go</a>

This won't work :o(

Bernard Marx

2:17 pm on Jan 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

<a href="http://domain.com/" onclick="window.open('http://domain.com/','','scrollbars=yes,width=750,height=580');return false;">Go</a> 

1. You need to use single quotes inside attributes, else the quoting doesn't make sense.

2. The URL needs to be given as the first arg to


3. Leave the URL in the href, it will be used as a normal link if JS is disabled.

4. return

, so the href isn't followed if JS is working normally.

5. The open method takes 3 arguments.

6. Read some documentation.


3:34 pm on Jan 28, 2005 (gmt 0)

10+ Year Member

Thanks Bernard.

That did work.

I'll go and read some JavaScript. :o)


Featured Threads

Hot Threads This Week

Hot Threads This Month