Monday, February 21, 2011

IE7 popup, hide the url bar

when i do window.open to do pop up on new window. i unable to hide the url bar in ie7. it still show the url bar even though it's read only. can hide it? i do not want user to see the url

From stackoverflow
  • In Internet Explorer 7 and later, you cannot remove the address bar in Internet Zone windows, for security (anti-spoofing) reasons.

    http://msdn.microsoft.com/en-us/library/ms536651%28VS.85%29.aspx

  • You cannot no longer hide the address bar in IE7. Read more about here in this MS article http://www.microsoft.com/windows/ie/community/columns/securityupgrade.mspx

  • You cannot do that in other browsers (Firefox, Chrome) also so even if you could do it in IE, it would have been pointless. Won't it?

  • This works for me in IE7, but only because I have the site added to the "Trusted sites" list.

    window.open(url, '_blank', 'toolbar=no,menubar=no,width=300,height=400,resizable=no,scrollbars=no');
    
    David Dorward : Yes, as other answers have already explained, the security limitation doesn't apply to trusted sites.
  • it depends on the user's security settings. if the site is in the 'local intranet' zone then you will be able to hide the address bar.

  • It can be done like this...

    window.open("about:blank", "popWin", "location=no");
    

    But of course, the user will always be able to configure the browser to dis-allow this. And I think by default, it will not allow it. IF you are on their "Trusted Sites" list, this will work though.

    Read More

0 comments:

Post a Comment