开发者

"Unable to get value of the property 'split': object is null or undefined" error in IE

开发者 https://www.devze.com 2023-03-19 01:21 出处:网络
I am trying to use ASP.NET AJAX Toolkit\'s MaskedEditExtender Control (with MaskedEditValidator) in my web application. The control works fine in Google Chrome but开发者_开发问答 IE9 throws a \"Unable

I am trying to use ASP.NET AJAX Toolkit's MaskedEditExtender Control (with MaskedEditValidator) in my web application. The control works fine in Google Chrome but开发者_开发问答 IE9 throws a "Unable to get value of the property 'split': object is null or undefined" error while loading the page that contains the MaskedEditExtender controls.

The Visual Studio debugger breaks into MaskedEdit.MaskedEditBehavior.debug.js at the following statements:

var partdt = arr[0];
var parttm = arr[1];
if (parttm.split(" ").length == 2) 
{
    parttm += " " + parttm.split(" ")[1];  // breaks here
}
partdt = this.ConvFmtDate(partdt,loadFirst);

I have also tried using the

<meta http-equiv="X-UA-Compatible" content="IE=8" />

as mentioned in this post but it did not work. I am also using JQuery 1.4.2 in my application. Any Ideas??


  • Did you recently convert your web application from MVC 2 to MVC 3?
  • If so, are you using unobtrusive Javascript?

Here's an excellent explanation from Brad Wilson.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号