I have a script that works fine in all browsers that I have tested so far (FF, Safari, camino, Chrome) but not in IE and I can’t figure out why. The IE 8 (windows 7) debug utility highlights this section of the script:
if(list[lineNum].getElementsByClassName("check")[0].getElementsByTagName("a")[0].getAttribute("title").search("Delete")==0)
and says:
Object doesn’t support this property or method
I thought perhaps that it might be that IE doesn’t like the list array so I added an explicit declaration at the beginning of the script
var list=new Array();
but i still get the same error.
I would really like to get this working on IE and would appreciate any help in doing so.
thanks
Internet Explorer doesn’t have native
getElementsByClassNamesupport. There’s a project that a lot of people use as an alternative, it’s available on Google Code here under the MIT license.Your code would become something like (not tested, just an example):
I would really recommend using jQuery, though. It’s built to make these things easy.