BUG: Cannot Change Status Bar Text in Dialog Box When You Use ShowModalDialog or ShowModelessDialog Function (305075)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 4.0
  • Microsoft Internet Explorer (Programming) 4.01
  • Microsoft Internet Explorer (Programming) 5
  • Microsoft Internet Explorer (Programming) 5.01
  • Microsoft Internet Explorer (Programming) 5.5

This article was previously published under Q305075

SYMPTOMS

When you use the showModalDialog or showModelessDialog function to open an HTML dialog box, you cannot change the text of the status bar in the dialog box as expected.

RESOLUTION

If you need to use the showModalDialog or showModelessDialog function, there is no known workaround for this issue. However, you can use the window.open property to change the status bar text.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Problem

  1. Create page1.htm based on the following code:
    <html>
    <body>
    <script language="jscript">
       function show()
       {	
    	// either way won't allow you to change status
    	//window.showModalDialog("page2.htm","","status=yes");
    	window.showModelessDialog("page2.htm","","status=yes");
    
    	//using window.open, you can change the status
    	//window.open("page2.htm","","status=yes");
       }
      
    </script>
    <input type="button" onclick="show()" value="Open Dialog">
    </body>
    </html>
    					
  2. Create page2.htm based on the following code:
    <html>
    <head>
     <script language="Jscript">
     function changeStatus()
     {
     window.status = "This is a new message on status line";
     div1.innerText="Status should have changed";
     }
     </script>
    </head>
    <body>
     <table>
     <tr>
     <td>This is a dialog.</td>
     </tr>
     <tr>
     <td><input type="button" value="Change Status Line" onclick="changeStatus();"></td>
     </tr>
     </table>
     <div id=div1></div>
    </body>
    </html>
    					
  3. Navigate to page1.htm in Internet Explorer.
  4. Click Open Dialog.

    A dialog box that contains page2.htm is displayed.
  5. Click Change Status Line.

    The window status bar remains the same as the URL for the page.

REFERENCES

For more information about the showModalDialog method, browse to the following MSDN Web site: For more information about the showModelessDialog method, browse to the following MSDN Web site: For more information about the window.status property, browse to the following MSDN Web site:

Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbbug kbDHTML kbnofix KB305075