473,388 Members | 1,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Link to same page

119 100+
Hi to all,

I am trying to do some link management in my page, that is i have few contents in my page each have his own headings, like


> heading 1
> heading 2
> heading 3



heading 2

heading 3

Now what i want to do is, i want to create a link for every headings like

<a href=#heading1>heading1</a>

When the user clicks in that link, then the content for that link should come up to the front,

this task is already furnished in wikipedia - sample

i want the same process for my page..

Can anyone help me please,

Thanks in advance,

Dec 12 '08 #1
6 4862
I take it you mean the content section of the Wiki page.
Could you not use anchors on your headers?

<a name = "header1">heading 1</a>
Header 1 Contents

Then for you link just <a href = "#header1"> Header 1 </a>

Is that what your looking for?
Mr. Prister
Dec 12 '08 #2
119 100+
@Mr Prister

Thank you dude,

Dec 12 '08 #3
Hi there... no probs,

Just thought if you actually using header tags

eg. <h1>Header 1</h1>

Then you can simply give the header an ID:
<h1 id = "header 1">Header 1</h1>
Then reference that just like you would the anchor.

I don't think it matters which you use but that one looks nice!
Dec 12 '08 #4
8,658 Expert Mod 8TB
@Mr Prister
except that whitespace is not allowed in an ID. (only letters, digits, underscores, hyphens, periods and colons)

Dec 12 '08 #5

Damn you with your correctness and damn me for the mistake... but a valid point none the less.
Dec 12 '08 #6
8,658 Expert Mod 8TB
@Mr Prister
damn yes. I'm sure there are a lot of people out there who do not know that fact.
Dec 12 '08 #7

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

Similar topics

by: crhaynes | last post by:
I'm having trouble with my CSS. My links are black, my hover is orange and my active link is red. When I select a link it turns red but i does not retain that color when the selected page loads. ...
by: Don G | last post by:
Within the menu for my site, I have inserted 'class="current"' within the link for the current page. So the link looks somthing link: <li><a href="index.php" class="current">Home</a></li> The...
by: VIJAY KUMAR | last post by:
Hi pals, I am using 2 web forms (pages). In first page, i have Datagrid control and on second page i have a hyper link control to the first page and Add value to the data grid/Database. ...
by: Aki | last post by:
Hi! I've been trying to create a home link in a document that is shown in a frameset of two frames. My aim is to show the first documents that were shown in the frames when the frameset was...
by: Harrie | last post by:
Hi, After Brian mentioned the use for <link rel=..> for navigational purposes in another thread, I've been looking into it and found that HTML 3.2 has two other recognized link types than HTML...
by: randau | last post by:
I would like to use the Link Target attribute, but am inhibited by the likelihood of a newly opened browser window completely hiding the Parent browser window. Thus offering the illusion that...
by: Andreas Prilop | last post by:
What exactly are Chapters and Sections in the <LINK REL=...> tag? I have put some <LINK REL="Chapter"> tags into http://www.unics.uni-hannover.de/nhtcapri/bidirectional-text.html Is this the...
by: SR | last post by:
I have started a web site using ASP.NET 2.0. I would like to centralize all of my classes in a StyleSheet but I cannot figure out how to link the StyleSheet to a Content Page since there is no...
by: Keith G Hicks | last post by:
I'm confused about how to code a link button to go to the page I need (asp.net 2.0) My root is "Website1" Here's the layout for the purposes of this question: Website1 (folder)...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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...
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,...
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...
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...

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.