FIX: Cannot Remove or Change Status Bar on HTML Dialog Box

ID: Q191186


The information in this article applies to:


SYMPTOMS

When using window.showModalDialog to show an HTML dialog box, there is no programmatic means for removing the status bar from the window.

Also, window.status appears to have no effect.


CAUSE

It is not possible to remove the status bar or change it via window.status for security reasons. The intention is to prevent Web pages from spoofing password dialog boxes that might retrieve personal user information.


STATUS

This behavior is by design. This behavior no longer occurs in Microsoft Internet Explorer 5.


MORE INFORMATION

One alternative approach is to use window.open, which can create windows without the status bar:


<SCRIPT LANGUAGE="JavaScript">
  function openANewWindow()
  {
     newwindow = window.open("URL", "WindowName", "status=no");
  }
</SCRIPT> 
However, this window will not be modal and the new window will need to access the creator window through window.opener to pass values back and forth.


REFERENCES

For more information, please see the MSDN Web Workshop:

http://msdn.microsoft.com/workshop/default.asp

Additional query words:


Keywords          : kbnokeyword kbIE400 kbIE401 kbScript kbIE401sp1 kbIE500fix 
Version           : 
Platform          : 
Issue type        : kbprb 

Last Reviewed: April 8, 1999