p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP 3.0 (http://p2p.wrox.com/forumdisplay.php?f=27)
-   -   Linking to specific areas in a new page (http://p2p.wrox.com/showthread.php?t=31895)

CathyM July 27th, 2005 12:24 PM

Linking to specific areas in a new page
I want to link from one page to another one with many sections, so I want to go to a specific section of that page and not to the top of the page. I've tried sending in a variable with the name of the section when the page is being requested, but that does not seem to work, and I get the page opened at the top of the document. Is there any way to link to a specific area on a new page, or do I just have to merge the two and use internal linking?


pgtips July 28th, 2005 08:07 AM

that's exactly what named anchors are for. just add #sectionName at the end of the link and it will scroll to that, providing the anchor has been defined.

For example, if page2.html contains <a name="Section2">
then in another page you can put <a href="page2.html#Section2">

CathyM August 2nd, 2005 09:23 AM

Thanks much,
It did work.


All times are GMT -4. The time now is 09:38 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.