homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

size of a new window
base target=_blank weidth?

 9:19 am on Aug 18, 2003 (gmt 0)

Hi all, first time poster here. I got a page with a lot of links on it. When a visitor clicks on a hyperlink, a new window opens. Can i set the height and weidth of the new window?
So my html now is:

base target="_blank"

But isn't it possible to set weidth and height for the new window?

Thanks folks!



 9:46 am on Aug 18, 2003 (gmt 0)

Welcom to webmasterworld milio!

Yes you can, but you have to do it with javascript:

<a href="#" onclick="window.open('http://your-link-here', '','width=300,height=200');">Link text</a>

On disadvantage with this method is that if the visitor wants to open a new window (right clicks or shift+click) it does not work correctly.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved