#1
  1. meester luva luva
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Posts
    2,715
    Rep Power
    25

    assign css class in JS, not just a CSS property...


    Is there no way I can replace

    document.all.registration_password_length_error.style.visibility = 'hidden';
    document.all.registration_password_length_error.style.display = 'none';

    with

    document.all.registration_password_length_error.style.class= 'classname';

    ??

    When I try it I get object expected errors.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2003
    Posts
    1,014
    Rep Power
    15
    Instead of someElement.style.class, use:
    someElement.className

    Hope this helps,
    Jeroen
  4. #3
  5. meester luva luva
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Posts
    2,715
    Rep Power
    25
    damn, yeah it does. and doh me! thanks jerom. I should have put a bit more thought into that in the first palce

IMN logo majestic logo threadwatch logo seochat tools logo