Welcome to WebmasterWorld Guest from 54.205.115.177

Forum Moderators: open

Message Too Old, No Replies

size of a new window

base target=_blank weidth?

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

10+ Year Member



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)

10+ Year Member



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.