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
    Mar 2004
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Correct Syntax Question

    document.all.blok1.innerHTML

    The bold text has to be the variable COUNT (which is a 1 now)
    I tried this
    document.all.["blok"+ count].innerHTML

    but that doesnt work..Anyone can help me with the correct Synax?

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try:

    Code:
    document.all["block"][1].innerHTML

  • #3
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    remember document.all is IE only.

    the cross-browser method is document.getElementsByName("block")[count].

  • #4
    New Coder
    Join Date
    Mar 2004
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thnx a lot...First one works fine...and ive got 100% ie users


  •  

    Posting Permissions

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