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 am trying to create tabs in HTML form.

    Can anybody suggest me how it can be done?

    If possible please post some code for atleast one functional tab.

    Thanks
  • itgaurav198
    New Member
    • Oct 2007
    • 41

    #2
    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:
    <ul id="globalnav">
      <li><a href="http://www.infosys.com">Home</a></li>
      <li><a href="#" class="here">About</a>
        <ul>
          [B]<li><a href="http://www.rediff.com" onClick="return  _function> Vision </a> </li>[/B]      <li><a href="#">Team</a></li>
          <li><a href="#">Culture</a></li>
          <li><a href="#">Careers</a></li>
          <li><a href="#" class="here">History</a></li>
          <li><a href="#">Sponsorship</a></li>
        </ul>
      </li>
      <li><a href="#">News</a></li>
      <li><a href="#">Proof</a></li>
      <li><a href="#">Process</a></li>
      <li><a href="#">Expertise</a></li>
      <li><a href="#">Help</a></li>
    </ul>
    But if i give both onclick and href then it doesn't call the given URL also.

    Please suggest the possible solution.

    Thanks


    Originally posted by itgaurav198
    Hi all,

    I am trying to create tabs in HTML form.

    Can anybody suggest me how it can be done?

    If possible please post some code for atleast one functional tab.

    Thanks

    Comment

    • Death Slaught
      Top Contributor
      • Aug 2007
      • 1137

      #3
      This seems more like a JavaScript problem. Try asking in our JavaScript section.


      Thanks, Death

      Comment

      • numberwhun
        Recognized Expert Moderator Specialist
        • May 2007
        • 3467

        #4
        You should check out the site dedicated to css tabs.

        Regards,

        Jeff

        Comment

        • drhowarddrfine
          Recognized Expert Expert
          • Sep 2006
          • 7434

          #5
          I do not recall the solution of using both in the same anchor or if there is one. On the one hand, the browser is to immediately jump to the anchor. But what happens with the javascript call? I've read about this somewhere before but, as stated above, I would ask on the js board for their views.

          Listamatic is another one for tabs. A List Apart has tutorials. CSSPlay has a ton but the CSS there can be rather tricky. There are basic ones listed, though.

          Comment

          Working...