473,473 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Creating tabs in html

41 New Member
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
4 1663
itgaurav198
41 New Member
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
1,137 Top Contributor
This seems more like a JavaScript problem. Try asking in our JavaScript section.


Thanks, Death
Mar 14 '08 #3
numberwhun
3,509 Recognized Expert Moderator Specialist
You should check out the site dedicated to css tabs.

Regards,

Jeff
Mar 14 '08 #4
drhowarddrfine
7,435 Recognized Expert Expert
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

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

Similar topics

1
by: Dan Jacobson | last post by:
In wdg-html-reference/html40/block/pre.html there is no mention about how ASCII tabs (^I) are to be rendered. I suppose all bets are off? Wait, my docs go thru html-tidy first, and it says...
5
by: Guy Incognito | last post by:
Hello, I've written an asp.net application that creates Excel documents. It works by creating an excel document in XML format. But I wonder if I'm reinventing the wheel. I know that there are...
5
by: develop | last post by:
Hi, People have told me that some web pages they've seen have tabs across their tops which are hypertext links. I can't see, so I'm not sure what they're talking about. Are these tabs some...
135
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about...
8
by: redeagle | last post by:
I'm wondering what the best practice is for creating a WinApp "wizard" that contains 4 or 5 "steps". Options so far are 1) Single WinForm making various controls visible/non visible at the...
16
by: Alan Isaac | last post by:
I am brand new to pylint. As a tab user, I want the tabs warning turned off. How? Larger question: where is the config file format documented? Thanks, Alan Isaac
1
by: dhwanimathur | last post by:
hi all this is my first post in this forum, i am beginner of JSP but since i work in organisation i have to work in Dreamweaver IDE directly instaed of textpad so i need help in creating JSP ...
7
by: Andrew Poulos | last post by:
Is there a way for javascript to know if a browser has been set to open new windows in tabs? I'm trying to fix some code that allows a user to close a window that javascript opened and it seems to...
1
by: itgaurav198 | last post by:
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...
12
by: udaypawar | last post by:
I am working on transactional website. I am storing transaction identifier (a unique id) in a cookie, so that I can display transaction history to user. Now a days modern browsers support...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.