PRB: ShowModalDialg Ignores Size Parameters (261944)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 5
  • Microsoft Internet Explorer (Programming) 5.01

This article was previously published under Q261944

SYMPTOMS

The showModalDialog method opens a dialog box with the default size and location, ignoring values specified in dialogHeight or dialogWidth.

CAUSE

The unit of measure is not specified in dialogHeight or dialogWidth, or these values are separated by a comma.

RESOLUTION

To resolve this problem, specify the unit of measure for the dialogHeight and dialogWidth and make sure that they are separated by a semicolon.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a html page, Test.htm, with the following code:
    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    <input type=button onclick="openDialog()" value="Open Dialog"></input>
    
    <Script language=Jscript>
    function openDialog()
    {
    	window.showModalDialog("http://www.microsoft.com","","dialogHeight:100;dialogWidth:500;");
    
    }
    </Script>
    </BODY>
    </HTML>
    					
  2. Navigate to Test.htm with Internet Explorer.
  3. Click the Open Dialog button.

REFERENCES

For syntax of the showmodaldialog method, please see the following Microsoft Web site: For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:

Modification Type:MajorLast Reviewed:5/11/2006
Keywords:kbDHTML kbieObj kbprb KB261944