Valhalla Legends Archive

Programming => Web Development => Topic started by: Denial on June 07, 2007, 05:52 PM

Title: html Anchors
Post by: Denial on June 07, 2007, 05:52 PM
I know when you Anchor id types it can go to a certain part of the page in a document but i forget if its possible to send a Anchor to a certain part of a page in another document or if they are only the same document ability.


For example   In Test.htm you have A subject and under that subject you have different places for example


Header

Mainsubject      Mainsubject2
Link                  Link
Link                  Link
Link                  Link



Now to click on a link and have to go to another document but not just go to that document but a certain place on that page
Title: Re: html Anchors
Post by: rabbit on June 07, 2007, 07:34 PM
As long as there are anchors in the destination, you can just add them on.
ie: <a href="page2.htm#blarg">some link</a> would work, assuming page.htm contains an anchor named "blarg".
Title: Re: html Anchors
Post by: iago on June 07, 2007, 08:07 PM
Quote from: rabbit on June 07, 2007, 07:34 PM
As long as there are anchors in the destination, you can just add them on.
ie: <a href="page2.htm#blarg">some link</a> would work, assuming page.htm contains an anchor named "blarg".

And within page2.htm, you have to have an anchor where you want it to jump to -> <a name='blarg' />
Title: Re: html Anchors
Post by: rabbit on June 07, 2007, 10:00 PM
Quote from: iago on June 07, 2007, 08:07 PM
Quote from: rabbit on June 07, 2007, 07:34 PM
As long as there are anchors in the destination, you can just add them on.
ie: <a href="page2.htm#blarg">some link</a> would work, assuming page.htm contains an anchor named "blarg".

And within page2.htm, you have to have an anchor where you want it to jump to -> <a name='blarg' />
Yeah, I made a typo.  I meant
Quote from: rabbit on June 07, 2007, 07:34 PM
page2.htm ...
Title: Re: html Anchors
Post by: iago on June 07, 2007, 10:44 PM
Quote from: rabbit on June 07, 2007, 10:00 PM
Quote from: iago on June 07, 2007, 08:07 PM
Quote from: rabbit on June 07, 2007, 07:34 PM
As long as there are anchors in the destination, you can just add them on.
ie: <a href="page2.htm#blarg">some link</a> would work, assuming page.htm contains an anchor named "blarg".

And within page2.htm, you have to have an anchor where you want it to jump to -> <a name='blarg' />
Yeah, I made a typo.  I meant
Quote from: rabbit on June 07, 2007, 07:34 PM
page2.htm ...
Well, I read it the way you intended. But you can't assume he knows how to add an "anchor" to a page, that was half of his question :P
Title: Re: html Anchors
Post by: Denial on June 08, 2007, 01:42 AM
I know how to add an anchor to the page i just didn't know if it was possible you can make the anchor relate to another page totally seperate