Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    not working in ie...

    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...

    Edit:
    don't worry, just worked it out...
    ie uses 'className'
    netscape uses 'class'
    Last edited by elvie; 04-19-2004 at 04:22 PM.

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    You can blame iew's faulty DOM implementation. Use className instead of getAttribute('class').
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    New Coder
    Join Date
    Mar 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks for the tip...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •