|
Posted by Gιrard Talbot on 03/20/07 00:37
Maxime wrote :
> Hello everybody !
>
> Here is my problem. I want to create a HTML link to another page, to a
> specified place in the target page. I do this using this code :
> source page : <a href="target_page.html#position>link</a>
> target page : <a name="position"></a>
This is called an empty anchor. It is always better and it is
recommended to avoid empty anchors.
E.g.: a good recommended way to create an anchor:
<h2><a name="section2">Section 2: How to create a link</a></h2>
> And it works, when clicking on "link" in the source page, the target
> page opens and the anchor "position" is placed on top of the page. Right.
>
This may be a normal fallback mechanism for a failure to reach the
targeted anchor and not a successful loading of the anchored position of
the page. If the anchor #position does not exist, then most/all browsers
will load the page at the top of the page anyway.
> But now I have to do the same with a target page (in PHP) with a
> parameter. The target URL is then "target_page.php?parameter=xxx" but
> how do I specify the anchor ? Using <a
> href="target_page.php#position?parameter=xxx>link</a> doesn't work.
>
> I tried using the "name" tag as this :
> source page : <a href="target_page.html" name="position">link</a>
> target page : <a name="position"></a>
> But it doesn't work, the target page opens but stays in top of the page...
> Is it possible to use the "name" tag when adressing to another page ? If
> yes, why does my code doesn't work ?
>
> Do anyone has an idea to help me ?
Nvu User Guide
3.7.1.3 Inserting named Anchors
3.7.1.4 Linking to named anchors
http://www.nvudev.org/guide/html/ugs03.htm#s3713
HTML Dog on links
http://www.htmldog.com/guides/htmlbeginner/links/
Web Authoring FAQ: hyperlinks (QDG)
6.2. How do I link to a location in the middle of an HTML document?
http://www.htmlhelp.com/faq/html/links.html#named-anchor
GΓ©rard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs/Using_Web_Standards_in_your_Web_Pages
Navigation:
[Reply to this message]
|