views:

2634

answers:

2

So first off I am learning JS and will not use a library until I know all I need to.

http://www.tombarrasso.com/search/

With that said why on earth does my code not work in < IE 7, Firefox < 3, etc? Safari 4 is perfect, Firefox 3.5 is great, etc. I am using the function getElementsByClassName from Robert Nyman.

It generates no errors in my IE 6 on OS X (through Wine). The Ajax request is fine, but there should be an initial div with id="one" and class="scroller", but there is not. I am just getting so frustrated with this.

Thanks,

  • Tom
+1  A: 

Personally, I would just use jQuery, as it already has the browser-compatability problems you are running into.

It's all fine to learn it all; but when it comes to handling implementation compatability it's better to have it dealt with for you, IMHO. There are just some things I don't care about :P

Noon Silk
A: 

IE8 gives error -"Object doesn't support property or method" when we use getElementsByClassName in javascript. Try this instead.

if (document.getElementsByClassName) {
    var obj = document.getElementsByClassName('classA');
}
Purni