Creating tabs in html

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • itgaurav198
    New Member
    • Oct 2007
    • 41

    Creating tabs in html

    Hi all,

    I have tried some code and now i am able to create the tabs but the problem is that my requirement is when a tab is clicked, both the javascript functions and the href given should be called. I have tried the following


    Code: ( text )
    [HTML]<ul id="globalnav" >
    <li><a href="http://www.infosys.com ">Home</a></li>
    <li><a href="#" class="here">Ab out</a>
    <ul>
    <li><a href="http://www.rediff.com" onClick="return _function> Vision </a> </li> <li><a href="#">Team</a></li>
    <li><a href="#">Cultur e</a></li>
    <li><a href="#">Career s</a></li>
    <li><a href="#" class="here">Hi story</a></li>
    <li><a href="#">Sponso rship</a></li>
    </ul>
    </li>
    <li><a href="#">News</a></li>
    <li><a href="#">Proof</a></li>
    <li><a href="#">Proces s</a></li>
    <li><a href="#">Expert ise</a></li>
    <li><a href="#">Help</a></li>
    </ul>[/HTML]


    But if i give both onclick and href then it doesn't call the given URL also.

    Please suggest the possible solution.

    Thanks
    Last edited by gits; Mar 17 '08, 07:56 AM. Reason: added code tags
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    What does the JavaScript function do?

    Probably the reason why the URL isn't followed is that the JS function returns false.

    Comment

    Working...