Javascript issue with IE 5
I have a jsp where in some javascript is used to perform some validations. it works perfectly fine with IE 6. When the same application is run from a different machine that has IE 5, it gives me a javascript error:
[b][i]'undefined' isnull or not an object[/i][/b]
If any one had faced a similar situation, can you throw some light on what exactly could be the reason for this?
Thanks,
SirG
# 1
I have run into that situation hundreds of times,and most likely, it is because you are calling an object (like a select list or Radio button group) with a standard that IE5 does not support.
Biggest example of this is the getElementById() tag ...
I you could post your code, I could try to get a better grasp of the reasoning behind it - otherwise, this is the best explanation I can offer.
# 2
The following is my piece of code:
//myForm is my form object
//attKey its just a String "name"
function getAttribute(myForm , attKey){
for(i=0; myForm.attributes.length > i; i++){
var att = myForm .attributes[i];
alert(" fetched Attribute value = " + att.name);
// att.name fetches me the names of all the attributes in IE 6.0
// att.name the same fetches me 'undefined' always in IE 5.5
if (att.name == attKey){
alert("attkey:: "+ attKey + " att.value::"+att.name);
return att;
}
}
alert(" nothing matched so returning null");
}
Client doesn't want to upgrade to IE 6, as there are more than 350 brances all over and there are many prior applications that are still not compatible with IE 6.