View Full Version : not working in ie...

04-19-2004, 05:09 PM
hi there, got this line of code which works perfectly in netscape/mozilla, but not in ie,

var unitPrice = what.elements[i].getAttribute('class');

just gives me null instead of the actual class name?

Any idea how to rectify this?
Thanks in advance...

don't worry, just worked it out...
ie uses 'className'
netscape uses 'class'

04-19-2004, 05:22 PM
You can blame iew's faulty DOM implementation. Use className instead of getAttribute('class').

04-19-2004, 06:02 PM
thanks for the tip...