Windows size with '_blank' as target and no attributes


  • How does IE determine the windows size of the browser that opens via a hyperlink with target = "_blank" or a call with a target of "_blank" and no attributes specified?

    In our company, I see all differnet behaviors - some systems, the window is large, other small.  Is there any way to affect the size other than adding the attributes to the function call?

    Wednesday, October 13, 2010 1:45 AM

All replies

  • Hi,

    It depends on your Security Zone settings. "Open scripted windows without restraints", and your tabbed browsing settings "When a popup is encountered". I think (not sure) that a null window argument will open in protected mode... you should avoid it along with document.write's. If you have a look at the computed source of about:blank you will see


    Ensure your users are ALWAYS using the default security zone templates (you can customize the security zone templates with GP).

    Tools>Internet Options, Security tab, click "Reset all zones to default".

    Wednesday, October 13, 2010 3:22 AM
  • Sorry, but I don't understand the answer.

    Let me give you a specific example.

    In Silverlight, I have a HyperlinkButton:

    <HyperlinkButton Content="{Binding Path=ReportName}" Foreground="Black" Margin="0,0,0,0" TargetName="_blank" NavigateUri="{Binding Path=ReportURL}" />

    For some users, when they click this hyperlink, the IE window that opens is large, for other users it is small.

    For the users who have a smaller window, they make the window larger or maximize it, then close it.  The next time they click on the link, the IE window still opens as a small window - so it does not remember the previous size.

    I am trying to determine if there is any way one can predict/configure/affect the size of the IE window that opens from a hyperlink generated from something like the above.

    (Of course, this is a Silverlight tag, but essentially the same thing would happen in a web page if it just had an anchor tag with a target of _blank.)


    Wednesday, October 20, 2010 1:13 PM
  • IE persists its window size when you close it.  So whatever size the window was the last time the window was closed is the size the new window will be.  At least, that's the goal.  The code is pretty wonky, as I recall, and there are bugs where it gets into weird states and persistence is overly aggressive or not at all.  

    I'm pretty sure let's you specify a size.  Perhaps you should consider using that?

    Wednesday, October 20, 2010 3:35 PM
  • IE seems to persist its window size when opened from a shortcut, but on our systems here, it definitely does not persist it for browser windows opened from an anchor tag (or hyperlink in Silverlight) where the target is _blank.

    On some systems, it opens it at about a quarter of the size of the screen and it always does that regardless of the size you make it because the user always has to make it larger in our case, and they have to do that every time they click on a link that opens a new window.

    This is in one of our apps (HTML and Silverlight) or clicking on a "drill through" report in SQL Reporting Services.

    I do know that I can use Javascript to use to specify the size of the window explicitly - however, I was hoping to find an alternative way, for two reasons:

    1) The Silverlight HyperlinkButton has no declarative attribute to specify the window size - I know I can do some coding to add this, trying to avoid it.

    2) In SQL Reporting Services, there seems to be no way to do this on drill through reports.  I have no control over how it generates those hyperlinks.  That's my main problem right now.


    Wednesday, October 20, 2010 8:16 PM