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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Dec 2003
    Location
    America
    Posts
    544
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Does anyone know what the script on this link is supposed to do?

    I went to a link to look up a method, and well, lets just say, the code does not work. Here's the link:

    http://www.mozilla.org/docs/dom/domr...1.html#1028304

    I copied, and pasted the code, and well, it doesnt seem to do squat.
    LovesWar

  • #2
    Regular Coder
    Join Date
    Jun 2004
    Location
    underground
    Posts
    186
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It attaches an onclick event to the table, which calls a function that changes the innerHTML of "td2"...

    For Internet Explorer, the equivalent method would be: el.attachEvent("onclick", l_func);

    There's an unscoped variable in the example that will cause an error in IE... it should be var t2 = document.getElementById("t2");


  •  

    Posting Permissions

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