Solved

How to link a page

Posted on 2012-12-23
5
286 Views
Last Modified: 2012-12-27
How can I cause a link to a page to open the page and show the area of the page that contains that section.  For example, a page has 5 sections and the user is on some other page and the click a link that takes them to the area of the page and shows section 4 instead of just sitting at the top of the page.

How is this done?

Thanks
0
Comment
Question by:tf2012
5 Comments
 
LVL 23

Assisted Solution

by:tailoreddigital
tailoreddigital earned 75 total points
ID: 38717397
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 350 total points
ID: 38717606
Actually that link is detailing the obsolete way of doing it.  In a modern page any id can be used as an anchor.  If you have"

<section id="mytarget">

the an url  like

href="http://www.mysite/mypage.html#mytarget"

will put the target section at the top of the page.

Any element can be targeted using the id.  Most commonly the heading tags are used.

Cd&
0
 
LVL 11

Assisted Solution

by:mcnute
mcnute earned 75 total points
ID: 38718570
Actually anchors work like this.

On the page where you want the user to land on after the click, you need to put an
<a name="section4">Section 4</a>

Open in new window

link where section 4 actually begins.

When the user clicks the url from the referral page:
http://the-domain-to-land-on.com/the-page-to-land-on.html#section4

Open in new window


He'll be directly landing in section 4 of the page.

Hope I got that clearly explained.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38718784
As I already stated the anchor form of the a tag is obsolete.

For backward compatibility the modern browsers will still find an anchor using name, but with additional overhead because they will look for id first.  

All new development and maintenance should not be using obsolete formats.

Please read the specification and follow best practice with current standards applied.

Cd&
0
 
LVL 1

Author Closing Comment

by:tf2012
ID: 38724895
Thanks for the info!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

30 Experts available now in Live!

Get 1:1 Help Now