FIX: HTML Dialog Ignores Size Parameters Without <SCRIPT> BlockID: Q190051
|
The Dynamic HTML (DHTML) window object provides a showModalDialog method,
which creates a dialog box to display an HTML document. The "features"
parameter of this method describes how the dialog box is to look and
includes dialogHeight and dialogWidth values to indicate the size of the
dialog box.
When showModalDialog is called from within DHTML script, the dialog box
fails to resize according to the dialogHeight and dialogWidth features
parameters.
HTML dialog boxes created by showModalDialog ignore changes to dialogHeight and dialogWidth unless the dialog HTML page contains at least one <SCRIPT> block.
<SCRIPT>
</SCRIPT>
<HEAD>
<STYLE ID="MyDialogStyle" TYPE="text/css">
HTML {width:400px;
height:200px;
top-margin:0;
bottom-margin:0;
left-margin:0;
right-margin:0}
</STYLE>
</HEAD>
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Microsoft Internet Explorer 5.
The following SCRIPT code reproduces this symptom if Dlg.htm is an HTML file with no <SCRIPT> blocks:
<SCRIPT LANGUAGE="JavaScript">
showModalDialog("dlg.htm","","dialogHeight:50px;dialogWidth:50px");
</SCRIPT>
For more information, please see the MSDN Web Workshop:
http://msdn.microsoft.com/workshop/default.asp
Additional query words:
Keywords : kbIE400bug kbIE401bug kbWebBrowser kbIE401sp1bug kbIE500fix kbIEdp1bug
Version : WINDOWS:4.0,4.01,4.01 SP1,5.0dp1
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 9, 1999