Solved

How to link a page

Posted on 2012-12-23
5
283 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
Comment Utility
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 350 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for the info!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

763 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

11 Experts available now in Live!

Get 1:1 Help Now