Infragistics NetAdvantage 的 ASP.NET部分控件在IE7.0 IE8.0 下不能正常工作的问题及解决
解决方法:
经过分析,发现问题出在站点目录下的infragistics\Scripts\ig_csom.js文件中。
源文件
// ig_csom class implements the basic browser independent functionality
function ig_initcsom()
{
// Public Properties
this.ScriptVersion ="3.1.20042.3";
// navigator.userAgent is not being validated because ig_csom should not be used for unknown browsers.
this.AgentName =navigator.userAgent.toLowerCase();
this.MajorVersionNumber =parseInt(navigator.appVersion);
this.IsDom =(document.getElementById)?true:false;
this.IsNetscape =(document.layers?true:false);
this.IsNetscape6 =(this.IsDom&&navigator.appName=="Netscape");
this.IsOpera =this.AgentName.indexOf('opera')!=-1;
this.IsMac =(this.AgentName.indexOf("mac")!=-1);
this.IsIE =(document.all?true:false);
this.IsIE4 =(document.all&&!this.IsDom)?true:false;
this.IsIE4Plus =(this.IsIE && this.MajorVersionNumber >= 4)?true:false;
this.IsIE5 =(document.all&&this.IsDom)?true:false;
this.IsIE50 =this.IsIE5&&(this.AgentName.indexOf("msie 5.0")!=-1);
this.IsWin =((this.AgentName.indexOf("win")!=-1) || (this.AgentName.indexOf("16bit")!=-1));
this.IsIE55 =((navigator.userAgent.indexOf("MSIE 5.5") != -1) && (navigator.userAgent.indexOf("Windows") != -1));
this.IsIEWin =(this.IsIE && this.IsWin);
this.IsIE6 =((navigator.userAgent.indexOf("MSIE 6.0") != -1) && (navigator.userAgent.indexOf("Windows") != -1));
this.IsIE55Plus =(this.IsIE55 || this.IsIE6);
this.IsSafari =this.AgentName.indexOf('safari')!=-1;
// Obtains an element object based on its Id
经过分析,发现问题出在站点目录下的infragistics\Scripts\ig_csom.js文件中。
源文件
// ig_csom class implements the basic browser independent functionality
function ig_initcsom()
{
// Public Properties
this.ScriptVersion ="3.1.20042.3";
// navigator.userAgent is not being validated because ig_csom should not be used for unknown browsers.
this.AgentName =navigator.userAgent.toLowerCase();
this.MajorVersionNumber =parseInt(navigator.appVersion);
this.IsDom =(document.getElementById)?true:false;
this.IsNetscape =(document.layers?true:false);
this.IsNetscape6 =(this.IsDom&&navigator.appName=="Netscape");
this.IsOpera =this.AgentName.indexOf('opera')!=-1;
this.IsMac =(this.AgentName.indexOf("mac")!=-1);
this.IsIE =(document.all?true:false);
this.IsIE4 =(document.all&&!this.IsDom)?true:false;
this.IsIE4Plus =(this.IsIE && this.MajorVersionNumber >= 4)?true:false;
this.IsIE5 =(document.all&&this.IsDom)?true:false;
this.IsIE50 =this.IsIE5&&(this.AgentName.indexOf("msie 5.0")!=-1);
this.IsWin =((this.AgentName.indexOf("win")!=-1) || (this.AgentName.indexOf("16bit")!=-1));
this.IsIE55 =((navigator.userAgent.indexOf("MSIE 5.5") != -1) && (navigator.userAgent.indexOf("Windows") != -1));
this.IsIEWin =(this.IsIE && this.IsWin);
this.IsIE6 =((navigator.userAgent.indexOf("MSIE 6.0") != -1) && (navigator.userAgent.indexOf("Windows") != -1));
this.IsIE55Plus =(this.IsIE55 || this.IsIE6);
this.IsSafari =this.AgentName.indexOf('safari')!=-1;
// Obtains an element object based on its Id
原来是js函数在判断时不能识别IE7.0。于是我加入以下代码:
this.IsIE7 =((navigator.userAgent.indexOf("MSIE 7.0") != -1) && (navigator.userAgent.indexOf("Windows") != -1));
并将 this.IsIE55Plus =(this.IsIE55 || this.IsIE6); 修改为 this.IsIE55Plus =(this.IsIE55 || this.IsIE6 || this.IsIE7);
在使用IE7.0登录系统,一些正常。哦也!!
原来是js函数在判断时不能识别IE8.0。于是我加入以下代码:
this.IsIE8 =((navigator.userAgent.indexOf("MSIE 8.0") != -1) && (navigator.userAgent.indexOf("Windows") != -1));
并将 this.IsIE55Plus =(this.IsIE55 || this.IsIE6); 修改为 this.IsIE55Plus =(this.IsIE55 || this.IsIE6 || this.IsIE7||this.IsIE8);
posted on 2009-07-27 11:25 jsyfmiaomiao 阅读(583) 评论(0) 编辑 收藏 举报