Solved

Link to an anchor in a frame

Posted on 2000-03-11
10
331 Views
Last Modified: 2010-04-09
Hi,

I have got a page with frames. It is rather standard: the left
frame is an index, in the right frame the page with the info is
loaded. The index only links to named anchors in the right page.
I have e.g. added the tag: <A NAME="find">Find</A>

My question: is it possible to link to "Find" from another
page that DOESN'T have a frame?


<frameset cols=100,*>
<frame src="index.html" name="index">
<frame src="test.html" name="test">
</frameset>


I tried to link to Find via: <A HREF="test.html#find">To: Find</A>
But this link and all others will just open test.html but not
at the place I want it: <A NAME="find">Find</A>

The page that I use to link to test.html really can't have a
frame. So I suspect this can't be done and I will have to use
a table for the index instead.

I appreciate any suggestions

0
Comment
Question by:zink
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 2

Expert Comment

by:HolySpirit
Comment Utility
zink,
I think u can use <A> tag to link to the "master" document that contain these code :
<frameset cols=100,*>
<frame src="index.html" name="index">
<frame src="test.html" name="test">
</frameset>

and don't just link to test.htm so that IE can load the frame.
-- Holy Spirit
0
 
LVL 8

Accepted Solution

by:
jbirk earned 100 total points
Comment Utility
Try not putting any text between between the anchor name...
<A NAME="find"></A>
That seems to work for me...

As for linking to a framed page...  if you want the point in the document "find" to be where it starts, and also have it start in it's frames, then link to a frameset page (like "index2.html") and have it's HTML code look like this:
<frameset cols=100,*>
<frame src="index.html" name="index">
<frame src="test.html#find" name="test">
</frameset>

-Josh
0
 
LVL 1

Expert Comment

by:technoman
Comment Utility
You can try this:

<FRAMESET>
 <FRAME SRC="INDEX.HTML" NAME="INDEX">
 <FRAME SRC="RIGHT.HTML" NAME="RIGHT">
</FRAMESET>

in the right.html file, in order to go to index anchor find, do this:

<A HREF="INDEX.HTML#FIND" TARGER="INDEX">To:Find</A>

just be sure to have in index.html

<A NAME="FIND"></A>

Hope this help.
0
 
LVL 1

Expert Comment

by:technoman
Comment Utility
ops! it should be <A HREF="INDEX.HTML#FIND" TARGET="INDEX">To:Find</A>

this tells the broser where the result should be reflected using the TARGET attribute.
0
 

Author Comment

by:zink
Comment Utility
Thanks for your input technoman, but I thinks I didn't make myself clear. I want to link from a page with NO frames to an anchor in the right.html file.

Your solution let me link from the right.html file to index.html. This is not what I wanted (although I appreciate the lesson, I didn't know how to do this; might need it in the future :) So I will have to reject your answer.

Josh, I tried what you suggested.. but it didn't work  (I use both Explorer 4 and Netscape 4).
I also placed several links on test.html (the right frame) to anchors on that same page:

<A HREF="test.html#anchor1"></A>
<A HREF="#anchor1"></A>
<A HREF="test.html#anchor2"></A>

After clicking any of these links, the anchor would  be at the top of the page. But the location still was help.html and not help.html#anchor1 or help.html#anchor2l

If the browser doesn't show the # anchor it is also not possible to link to it.



0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 8

Expert Comment

by:jbirk
Comment Utility
Could you provide a link to your pages that aren't working.  That way I can try and diagnose the problem with the whole picture in mind...  It's possible that something else is affecting this and causing it not to work.

-Josh
0
 
LVL 32

Expert Comment

by:Batalf
Comment Utility
When a page are "loaded" into a page with frames, you could have links in it which would open in an other frame.

Like Tecnoman proposed.

<A HREF="INDEX.HTML#FIND" TARGET="INDEX">To:Find</A>

It doesn't matter if the page have frames or not.

Just be aware of lowercase, uppercase and so on if your page is on a unix-machine.

Batalf

0
 
LVL 32

Expert Comment

by:Batalf
Comment Utility
or maybe just like this :

<A HREF="index.html" TARGET="index">To:Find</A>
0
 

Author Comment

by:zink
Comment Utility
Thank you all.

Josh, I didn't have time to look what was wrong yesterday.. but I just saw that I forgot to NOT place any text between the anchor.. like you told me to. It works fine now :)
0
 
LVL 8

Expert Comment

by:jbirk
Comment Utility
I thought that might have caused a problem :)

Glad it works now!

-Josh
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now