SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Sep 2006
    Location
    CA, USA
    Posts
    425
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to get a nested table node in DOM

    e.g. How to get table6 node from document?


    table1
    table2
    table4
    table3
    table5
    table6

  2. #2
    Senior Member
    Join Date
    Sep 2006
    Location
    CA, USA
    Posts
    425
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to get a nested table node in DOM

    It messes up my indent.

    Retype them below
    table1
    ------table2
    ------------table4
    ------table3
    ------------table5
    ------------------table6

  3. #3
    Member
    Join Date
    Apr 2008
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to get a nested table node in DOM

    if you know the table name or id try using:

    Set aInput=document.getElementsByName("firstName")
    regards,
    hari

  4. #4
    Senior Member
    Join Date
    Sep 2006
    Location
    CA, USA
    Posts
    425
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to get a nested table node in DOM

    There is no name and no id for table6. I can only use:

    GetElementsByTagName("table")

  5. #5
    Senior Member
    Join Date
    Sep 2006
    Location
    CA, USA
    Posts
    425
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to get a nested table node in DOM

    It turns out that GetElementsByTagName("table") gets all table objects in the source index order no matter what hirauchical structure it has.

    So to get table6 I just write tables(5)

  6. #6
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: How to get a nested table node in DOM

    Look at ChildNodes property of the node. This way you can traverse to childnodes

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:47 AM.

Copyright BetaSoft Inc.