html link to a section on another...

User 282670 Photo


Registered User
3,940 posts

I tried that to bass, uh huh! no go! darn it ! thought it worked once but......:D
my book says samething-maybe i'm not drinking enough milk.

what I have so far in VSD is this ( using a pre made page copied into VSD)
<a href=Page11.html.#Dolls">Dolls</a>

on the page I want to go to I have:
<a name="Dolls"></a>
This works offline, but online 404 error.
I even tried linking to external html page, same error.
could it be the server I'm on? one wonders

same goes for any images..... just an FYI thingy.:/




User 539237 Photo


Registered User
241 posts

Thanks to you both, Have tried something similar before but will try again later checking that I am keying it right.

At work currently so unable to try until this evening but will post the result as soon as I know.
Isnt it something to do with anchors and relative paths?
Greg

When I stop learning please check for signs of life.
User 597929 Photo


Registered User
1,332 posts

Does this help:

http://www.w3schools.com/HTML/html_links.asp

The relevant section:

Example:

A named anchor inside an HTML document:
<a name="tips">Useful Tips Section</a>


A link to the Useful Tips Section from the same document:
<a href="#tips">
Jump to the Useful Tips Section</a>

A link to the Useful Tips Section from another document:
<a href="http://www.w3schools.com/html_tutorial.htm#tips">
Jump to the Useful Tips Section</a>

"You can't be a real country unless you have a beer and an airline - it helps if you have some kind of a football team, or some nuclear weapons, but at the very least you need a beer." -- Frank Zappa

Visit Spinland Studios: http://www.spinland.biz
User 373928 Photo


Registered User
141 posts

I finally tested this. It is a probby coz you cannot use preview with absolute links. I entered two named ares on my target page, one at the bottom and the other at the top. I linked to the bottom one. It did not go there. When I viewed the source I saw that VSD had placed both tags at the top. See:

<div class="Object73"><A NAME="Here1"></A></div>
<div class="Object74"><A NAME="Here2"></A></div>


<div class="Object75"><table border=0 cellspacing=0 cellpadding=0><tr><td valign="top" align="left"><div class="text-align:left;margin-left:0px;text-indent:0px;"><span class="textstyle0">Page Two<br>
</span></div></td></tr></table></div>

<div class="Object76"><table border=0 cellspacing=0 cellpadding=0><tr><td valign="top" align="left"><div class="text-align:left;margin-left:0px;text-indent:0px;"><span class="textstyle0">This is a test.<br>

</span></div></td></tr></table></div>

<div class="Object77"><table border=0 cellspacing=0 cellpadding=0><tr><td valign="top" align="left"><div class="text-align:left;margin-left:0px;text-indent:0px;"><span class="textstyle0">This is a test.<br>
</span></div></td></tr></table></div>

<div class="Object78"><table border=0 cellspacing=0 cellpadding=0><tr><td valign="top" align="left"><div class="text-align:left;margin-left:0px;text-indent:0px;"><span class="textstyle0">This is a test.<br>
</span></div></td></tr></table></div>

<div class="Object79"><table border=0 cellspacing=0 cellpadding=0><tr><td valign="top" align="left"><div class="text-align:left;margin-left:0px;text-indent:0px;"><span class="textstyle0">This is a test.<br>
</span></div></td></tr></table></div>

<div class="Object80"><table border=0 cellspacing=0 cellpadding=0><tr><td valign="top" align="left"><div class="text-align:left;margin-left:0px;text-indent:0px;"><span class="textstyle0">This is a test.<br>
</span></div></td></tr></table></div>

</body>
I have an inferiority complex - but it is not a very good one.
User 373928 Photo


Registered User
141 posts

I guess that isn't very clear....
I have an inferiority complex - but it is not a very good one.
User 373928 Photo


Registered User
141 posts

Seems like VSD defines all of the objects you create on the page and then places them in a big old table in the right places. For some reason (lazy programmer?) it does not put the 'target areas' into this table. Now we know why we are not getting anywhere. I guess that can be called progress.

Ah, me. Back to my music. Have fun, boys and girls.
I have an inferiority complex - but it is not a very good one.
User 597929 Photo


Registered User
1,332 posts

If the HTML box includes some content that has a definite location, the anchor that's in that same box will be associated with the location. What I do is pick some text that's where I want the anchor to be, and enter that text via an HTML box instead of a text box. Then I slip the anchor code in as part of the HTML and it "sticks" to the same place the text appears.

Make sense?
"You can't be a real country unless you have a beer and an airline - it helps if you have some kind of a football team, or some nuclear weapons, but at the very least you need a beer." -- Frank Zappa

Visit Spinland Studios: http://www.spinland.biz
User 539237 Photo


Registered User
241 posts

Sounds good to me Spinny.
I will try it tonight and let you know.

Thanks to all
Greg

When I stop learning please check for signs of life.
User 597929 Photo


Registered User
1,332 posts

For example, a page on my web site has a link at the bottom to jump back to the top. Here's the URL:

http://www.spinland.biz/links.html

The page header is an HTML box with H1 tags, and I added an anchor. Here's the code:

<div class="Object3517"><a name="top"><h1>Links</h1></a></div>


Now if you jump up to the style part of the page to see how :Object3517" is defined, you see:

div.Object3517 { position:absolute; top:8px; left:238px; width: 624px; z-index:0; }
div.Object3517 table { width: auto; }


Because I associated "top" with some specific text that has a location on the page, it gets an absolute location defined for it, and #top will go there.

Linking to it from another page probably requires the full URL, as per the w3xschool example I quoted a few posts above.
"You can't be a real country unless you have a beer and an airline - it helps if you have some kind of a football team, or some nuclear weapons, but at the very least you need a beer." -- Frank Zappa

Visit Spinland Studios: http://www.spinland.biz
User 597929 Photo


Registered User
1,332 posts

Oh, for clarity, the only part I actually entered into the HTML box was this:

<a name="top"><h1>Links</h1></a>


The <div> part and all that was added by VSD when the page was published.
"You can't be a real country unless you have a beer and an airline - it helps if you have some kind of a football team, or some nuclear weapons, but at the very least you need a beer." -- Frank Zappa

Visit Spinland Studios: http://www.spinland.biz

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.