By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,632 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,632 IT Pros & Developers. It's quick & easy.

Creating tabs in html

P: 41
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
Mar 14 '08 #1
Share this Question
Share on Google+
4 Replies


P: 41
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

Expand|Select|Wrap|Line Numbers
  1. <ul id="globalnav">
  2.   <li><a href="http://www.infosys.com">Home</a></li>
  3.   <li><a href="#" class="here">About</a>
  4.     <ul>
  5.       <li><a href="http://www.rediff.com" onClick="return  _function> Vision </a> </li>      <li><a href="#">Team</a></li>
  6.       <li><a href="#">Culture</a></li>
  7.       <li><a href="#">Careers</a></li>
  8.       <li><a href="#" class="here">History</a></li>
  9.       <li><a href="#">Sponsorship</a></li>
  10.     </ul>
  11.   </li>
  12.   <li><a href="#">News</a></li>
  13.   <li><a href="#">Proof</a></li>
  14.   <li><a href="#">Process</a></li>
  15.   <li><a href="#">Expertise</a></li>
  16.   <li><a href="#">Help</a></li>
  17. </ul>
But if i give both onclick and href then it doesn't call the given URL also.

Please suggest the possible solution.

Thanks


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
Mar 14 '08 #2

Death Slaught
100+
P: 1,137
This seems more like a JavaScript problem. Try asking in our JavaScript section.


Thanks, Death
Mar 14 '08 #3

numberwhun
Expert Mod 2.5K+
P: 3,503
You should check out the site dedicated to css tabs.

Regards,

Jeff
Mar 14 '08 #4

drhowarddrfine
Expert 5K+
P: 7,435
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.
Mar 14 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.