| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Open new window from pop-up|
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.
<a href="http://domain.com/" onclick="window.open("","scrollbars=yes,width=750,height=580");return true;">Go</a>
This won't work :o(
<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.
false, so the href isn't followed if JS is working normally.
5. The open method takes 3 arguments.
6. Read some documentation.
That did work.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved