user244470
user244470

Reputation: 7759

How to open a new window from hyperlink in IE

Here is my code

<a target="_blank" href="http://www.example.com" class="style1">Click</a>

In IE6 when it is been clicked it opens a window but its not a fullsized window its only half of the orginal window size.In IE7 and IE8 its 3/4th.In Mozilla it works good.Without changing the browser settings how can i make my customers to view the landing page in a full new window in IE.Please help me in this context.

regards

Arun

Upvotes: 0

Views: 1887

Answers (1)

Chris
Chris

Reputation: 28064

You cannot control the new window's size in pure HTML. You'll have to use either an onclick handler to do a window.open via javascript, passing the new window's size to that function, or more preferrably in your case, use a resize function in the target page to increase the new window to the current screen size.

However, I feel compelled to advise against doing either. It's a non-standard (common, but non-standard) UI experience and can be incredibly frustrating, especially in browsers that open links targeting "_blank" as tabs rather than new windows.

Example of an onclick handler:

<a href="somepage.html" onclick="window.open('somepage.html', 'newWindowId', 'width='+screen.width+',height='+screen.height); return false;">click here</a>

Upvotes: 5

Related Questions