locked
IE7 ignores "location"/"status" properties in window.open? RRS feed

  • Question

  • I'm using this pretty standard code to open a new window with javascript:

      params = 'width=100,height=100,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0';
      window.open(href, windowname, params);

    It seems to work fine when I test locally, but when run from my server, the 'location' and 'status' properties get ignored and I seem to get an address bar and a status bar no matter what. Other properties (such as "scrollbars") are respected.

     

    This is with IE7. Haven't had a chance to check with Firefox yet. Any ideas/help are much appreciated. Thanks!

    Monday, March 17, 2008 4:16 PM

Answers

  •  

    This is a security feature.  Unless your site is recognised as a trusted site by the browser the removal of the address bar and status bar is disallowed.  This stop malicious sites emulating standard windows dialogs that can con people into giving away details such as usernames and passwords.

     

    Tuesday, March 18, 2008 9:06 AM

All replies

  •  

    This is a security feature.  Unless your site is recognised as a trusted site by the browser the removal of the address bar and status bar is disallowed.  This stop malicious sites emulating standard windows dialogs that can con people into giving away details such as usernames and passwords.

     

    Tuesday, March 18, 2008 9:06 AM
  • well bummer. thanks though!

    Tuesday, March 18, 2008 4:35 PM