none
In IE10, showModalDialog a frameset page,the parameters dialogHeight\dialogWidth is ignored

    Question

  • Hi,
    My web app need popup a modal window with size about 800*600 to process business data, it works fine in previous ie version, also works fine in firefox、safari、chrome desktop version. Now I find it cannot work with IE10 in Win7, when showModalDialog is called, it popup a small window with size about 250*150, the parameter dialogHeight dialogWidth is ignored.

    I know this can be solved by setting x-ua-compatible for IE in desktop, but I hope it can also work in Windows Store apps and new Windows UI where x-ua-compatible is not supported. 
     
    In order to describe it, I simplify related page code, here is them:

    1、list.htm,this page will call showModalDialog to pop up frame.htm
    <HTML>
    <HEAD>
    <SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
    <!--
    function AddRecord()
    {
     window.showModalDialog("frame.htm","","dialogHeight:600px;dialogWidth:800px;");
    }
    //-->
    </SCRIPT>
    </HEAD>
    <BODY>
     <input type="button" id="btnAdd" value="Add Record"  LANGUAGE="javascript" onclick="return AddRecord()">
    </BODY>
    </HTML>

    2、frame.htm,include 2 pages:1.htm 2.htm
    <html>
    <head>
     <title>AppTitle</title>
    </head>
    <frameset rows="90,*" frameborder="1">
     <frame scrolling="auto" src="1.htm">
     <frame scrolling="auto" src="2.htm">
    </frameset>
    </html>

    3、1.htm
    <HTML>
     <BODY>
      This is page1
     </BODY>
    </HTML>

    4、2.htm
    <HTML>
     <BODY>
      This is page2
     </BODY>
    </HTML>

    Thursday, November 29, 2012 2:43 AM

All replies

  • Hi,

    update your markup to html5 so that it renders and execute scripts with the latest versions.

    add <!doctype html>

    see http://msdn.microsoft.com/en-us/library/ms536759(v=VS.85).aspx

    For Windows Internet Explorer 7, dialogHeight and dialogWidth return the height and width of the content area and no longer includes the height and width of the frame.

    Internet Explorer 7.  Although a user can manually adjust the height of a dialog box to a smaller value —provided the dialog box is resizable— the minimum dialogHeight you can specify is 100 pixels, and the minimum dialogWidth you can define is 250 pixels. In versions earlier than Internet Explorer 7 the minimum value of the dialogWidth that can be specified is 100 pixels.

    Note  For Internet Explorer 7, help is not a valid value for sFeatures. In previous versions, help:{ yes | no | 1 | 0 | on | off } specified whether the dialog window displays the context-sensitive Help icon.

    This method must use a user-initiated action, such as clicking on a link or tabbing to a link and pressing enter, to open a pop-up window. The Pop-up Blocker feature in Microsoft Internet Explorer 6 blocks windows that are opened without being initiated by the user.


    Rob^_^

    Thursday, November 29, 2012 7:17 PM
  • Hi Robs, thanks your reply.

    I have add  <!doctype html> to frame.asp, but it doesn't take effect , it still popup a small window. Here is the new code:

    <!doctype html>
    <head>
     <title>AppTitle</title>
    </head>
    <frameset rows="90,*" frameborder="1">
     <frame scrolling="auto" src="1.htm">
     <frame scrolling="auto" src="2.htm">
    </frameset>
    </html>

    If I add  x-ua-compatible to frame.asp, it take effect , it can popup window with desired size. Here is the new code:

    <html>
    <head>
     <meta http-equiv="x-ua-compatible" content="IE=6">
     <title>AppTitle</title>
    </head>
    <frameset rows="90,*" frameborder="1">
     <frame scrolling="auto" src="1.htm">
     <frame scrolling="auto" src="2.htm">
    </frameset>
    </html>

    I have read the article, know Store apps dosen't support showModalDialog, but I hope it can support this function, or is there any alternative solution for showModalDialog?

    Saturday, December 1, 2012 3:27 AM