面对IE-9的浏览器兼容性问题

时间:2015-02-24 12:33:44

标签: javascript browser compatibility meta-tags oracle-adf

我面临与ADF网络应用程序的兼容性问题。尝试添加元标记 - '<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />',甚至尝试注入java脚本来抑制兼容性问题,但没有任何反映。以下是java脚本 -

`

<af:resource type="javascript">
var meta = document.createElement('meta');
meta.setAttribute('http-equiv', 'X-UA-Compatible');
meta.setAttribute('content', 'IE=Edge');
document.getElementsByTagName('head')[0].appendChild(meta);
</af:resource>

`

在.jspx页面中添加元标记,如下所示 -

1) “

<af:document>
 <f:facet name="metaContainer">
  <f:verbatim>
   <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8;IE=7;IE=EDGE"/>
  </f:verbatim>
 </f:facet>
-----
<f:facet>
----
----
</f:facet>
</af:document>

2) “

<af:document>    
   <f:facet name="metaContainer">        
      <af:group id="metaContainer"> 
           <trh:meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7;      IE=EDGE"/>
      </af:group>        
   </f:facet>
</af:document>

None of the above approaches are working with the application, Kindly help me out with your suggestions.

 Thanks in advance

2 个答案:

答案 0 :(得分:1)

最好知道您正面临哪种兼容性问题,IE版本,Jdeveloper版本等。

但是,作为一个疯狂的猜测,我会建议这个博客: http://jonasdegraaff.blogspot.co.uk/2013/11/how-to-run-your-adf-111x-application.html

答案 1 :(得分:0)

上述问题可以通过使用Jdeveloper的少量补丁并将下面的上下文参数添加到xml文件来解决。

<context-param> 
  <paramname>oracle.adf.view.rich.HIDE_UNSUPPORTED_BROWSER_ALERTS</paramname> 
  <param-value>IECompatibilityModes</param-value>
  </context-param> 

  <context-param>      <paramname>org.apache.myfaces.trinidad.Agent#OVERRIDE_IE_COMPATIBILITY_MODE<pa‌​ram-name> 
  <param-value>true</param-value> 
  </context-param>