?
Solved

Link to an anchor in a frame

Posted on 2000-03-11
10
Medium Priority
?
341 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 2

Expert Comment

by:HolySpirit
ID: 2609025
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 400 total points
ID: 2609035
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
ID: 2609270
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Expert Comment

by:technoman
ID: 2609272
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
ID: 2610550
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
 
LVL 8

Expert Comment

by:jbirk
ID: 2610602
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
ID: 2611640
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
ID: 2611653
or maybe just like this :

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

Author Comment

by:zink
ID: 2614772
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
ID: 2615778
I thought that might have caused a problem :)

Glad it works now!

-Josh
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

771 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