I have a ASP.NET web application that uses ASP.NET AJAX. The application gives me following random javascript error
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; WOW64; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; CIBA; .NET4.0C; .NET4.0E)
Timestamp: Fri, 2 Jul 2010 17:19:22 UTC
Message: 'length' is null or not an object
Line: 5
Char: 18997
Code: 0
URI: http://172.16.199.109/TWQAUDTUK_App/ScriptResource.axd?d=BssYA8UXb_xixM2kbWCVNiQB3yadiDxpyviVKlvm-OzfLO5PAqndPHn02Na1YNGeyuN9FBDbUO716zVqct-04yJjJTi77-kEQQ_jKSRCUY81&t=5dc69638
The place I got error is in MicrosoftAjax.js
Array.indexOf = function Array$indexOf(array, item, start) {
/// <param name="array" type="Array" elementMayBeNull="true"></param>
/// <param name="item" optional="true" mayBeNull="true"></param>
/// <param name="start" optional="true" mayBeNull="true"></param>
/// <returns type="Number"></returns>
var e = Function._validateParams(arguments, [
{name: "array", type: Array, elementMayBeNull: true},
{name: "item", mayBeNull: true, optional: true},
{name: "start", mayBeNull: true, optional: true}
]);
if (e) throw e;
if (typeof(item) === "undefined") return -1;
var length = array.length;
if (length !== 0) {
start = start - 0;
if (isNaN(start)) {
start = 0;
}
else {
if (isFinite(start)) {
start = start - (start % 1);
}
if (start < 0) {
start = Math.max(0, length + start);
}
}
for (var i = start; i < length; i++) {
if ((typeof(array[i]) !== "undefined") && (array[i] === item)) {
return i;
}
}
}
return -1;
}
How do I troubleshoot this problem?