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 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2004
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    a problem with setAttribute

    I've created a dynamic table where rows can be added upon clicking 'add new row' button
    I gave some attribues to <td> tags by 'setAttribute'

    the problem is here that 'setAttribute' doesn't work for 'valign' attribute,
    for example tag.setAttribute('align','right'); works correctly, but tag.setAttribute('valign','top'); does not work!

    I'm using IE6
    what's the reason?
    thanks.

  • #2
    Regular Coder
    Join Date
    Jun 2004
    Posts
    565
    Thanks
    0
    Thanked 18 Times in 18 Posts
    Try:

    tag.style.verticalAlign = 'top';

    dumpfi

  • #3
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've run into this problem before myself....

    Try camelCasing vAlign....

    setAttribute('vAlign','top');

    .....Willy

  • #4
    New Coder
    Join Date
    Aug 2004
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    greate
    thank you both.


  •  

    Posting Permissions

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