0

I am wondering if someone can help me with the "X-UA-Compatible" tag with regards to launching a modal dialog.

I have the following page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 <html xmlns="http://www.w3.org/1999/xhtml" >
     <head id="Head1" runat="server">
         <meta http-equiv="X-UA-Compatible" content="IE=9" />
         <title></title>
     </head>
     <body onload="load()">
          <form id="form1" runat="server">
          <iframe name="fr1" frameborder="0" id="fr1" width="675px" height="550px"></iframe>

. . .

var src = http://someurl.web; 
document.all.fr1.src = src;

If I browse directly to this page (not to the http://someurl.web, but the page with the IFrame on it that points at http://someurl.web), the "X-UA-Compatible" stuff will work correctly, however, if I launch my page like below:

window.showModalDialog(urlToPage, "", "dialogHeight: 550px; dialogWidth: 800px; center: Yes;")

The "X-UA-Compatible" stuff is ignored. Why is this? What do I need to do in order to get that tag to be recognized when the page it is on launched via showModalDialog? This is happening when using IE9 on an Intranet site with "Display Intranet site in Compatibility View" Management will not allows to uncheck this, hence the use of the "X-UA-Compatible" tag.

4

1 回答 1

2

据我了解,在 IE9(及更高版本)中,如果在 iframe 中启动页面,则文档模式将匹配父文档的模式,无论任何X-UA-Compatible元元素或服务器标题如何,除非父级使用标准模式并且iframe 指定怪癖模式。我不知道解决方法。

有关详细信息,请参阅http://blogs.msdn.com/b/ie/archive/2010/06/16/ie-s-compatibility-features-for-site-developers.aspx

于 2013-10-29T17:29:00.703 回答