Click to See Complete Forum and Search --> : linking to a location on a second page


javascriptlover
01-10-2009, 03:09 PM
Hey all,

how do I link from page A to half way down page B? At the moment I'm trying:




<a href=""#location"pageB"">click here</a>

TheTeenScripter
01-10-2009, 03:13 PM
<a href="#locationb">click here</a>

you also need a tag with the reference to #locationb:

<a name="locationb">This is where it will scroll to</a>

TheTeenScripter
01-10-2009, 03:15 PM
if you are trying to link it from a different page, you need to link it like this:

<a href="pageb.htm#locationb">Click here</a>
or
<a href="http://www.blah.com/pageb.htm#locationb">Click here</a>
or
<a href="../blah/pageb.htm#locationb">Click here</a>
or
<a href="/pageb.htm#locationb">Click here</a>

Major Payne
01-11-2009, 10:11 AM
That is a "name Attribute (http://www.w3schools.com/HTML/html_links.asp)" link. Practice making them online: Try it yourself (http://www.w3schools.com/HTML/tryit.asp?filename=tryhtml_link_locations) That's for a link on same page, but principles shown with proper URL to other page will work.