473,511 Members | 15,178 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating tabs in html

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


Code: ( text )
[HTML]<ul id="globalnav">
<li><a href="http://www.infosys.com">Home</a></li>
<li><a href="#" class="here">About</a>
<ul>
<li><a href="http://www.rediff.com" onClick="return _function> Vision </a> </li> <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>[/HTML]


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

Please suggest the possible solution.

Thanks
Mar 17 '08 #1
1 1154
acoder
16,027 Recognized Expert Moderator MVP
What does the JavaScript function do?

Probably the reason why the URL isn't followed is that the JS function returns false.
Mar 17 '08 #2

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

Similar topics

1
3409
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
3355
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
9614
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
7342
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
7467
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...
1
1750
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
3000
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...
4
1666
by: itgaurav198 | last post by:
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
12
20558
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
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7137
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...
1
7074
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
5659
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4734
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
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
445
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.