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
    New Coder
    Join Date
    Nov 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reach the outer element?

    I am going to set li-element id to cuurent, could i reach the object and send it within "highlighttab(this, 'home')," Change this against the list object.



    PHP Code:
    <li><a href="#" onClick="highlighttab(this, 'home')">Home</a></li
    When i do as in the above example i set the a-element to current. I want to do like the code below. This i thougt to do with javascript.

    PHP Code:
    <li id="current"><a href="#" onClick="highlighttab(this, 'home')">Home</a></li

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <li id="test"><a href="#" onclick="this.parentNode.id='current';alert(this.parentNode.id);return false">Home</a></li>


  •  

    Posting Permissions

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