Microsoft KB Archive/327315

From BetaArchive Wiki
Knowledge Base


Return Value of ShowModalDialog Is Always Set to UNDEFINED for the About: Protocol In Internet Explorer 6.0

Article ID: 327315

Article Last Modified on 11/29/2007



APPLIES TO

  • Microsoft Internet Explorer 6.0



This article was previously published under Q327315

SYMPTOMS

When you use the About: Protocol with the ShowModalDialog function in a script on Microsoft Internet Explorer version 6.0, the return value of ShowModalDialog is always set to UNDEFINED (NULL). This problem does not occur with earlier versions of Internet Explorer.

To reproduce this issue, create the following HTM page :

<html>
<body>

<SCRIPT>
function MyMsgBox()
{
 url='about:<html><body onload="window.returnValue =true">test</body></html>';
 var result = window.showModalDialog (url);
 alert (result);
}
</SCRIPT>

<body onload="MyMsgBox()">
test
</body>
</html>

If you use Internet Explorer version 6.0 to load the page, Window.ShowModalDialog returns a value of UNDEFINED

WORKAROUND

To work around this behavior, you can do the following:

  1. Change the page extension to HTA.
  2. Do not pass the About: URLto ShowModalDialog. Pass the HTTP: URL instead.


STATUS

Microsoft has confirmed that this is a problem in Microsoft Internet Explorer 6.0.


Additional query words: about showModalDialog

Keywords: kbfix kbie600presp1fix kbprb kbie600sp1fix KB327315