Solved

Link to an anchor in a frame

Posted on 2000-03-11
10
336 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
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 100 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

920 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

15 Experts available now in Live!

Get 1:1 Help Now