PDA

View Full Version : iFrame HELP!


Basscadet
05-18-2005, 12:43 PM
Hello!

I have a question regarding using iframes. I have a page with an iframe on it, within that iframe is some named anchors. I am trying to link to the anchors within the iframe from a seperate html page. But I can't get it to work!! Its driving me mad! anyone got any ideas.

Big thanx in advance!

domedia
05-18-2005, 05:57 PM
Bass, how are you doing it now? Can we see some code or the website so we can figure out what is wrong? :)

Basscadet
05-19-2005, 12:00 PM
Cheers for your reply.

Basically, Page 1 has the iFrame on it:

CODE: <IFRAME name="itemsFrame" src="frameContent.htm" width=460 height=220 marginwidth=0 marginheight=0 frameborder=0 scrolling=auto></IFRAME>

The frameContent.htm file has 4 named anchors on: Item1, Item2, Item3, Item4.

Page 2 is a basic HTML page with normal links on it (gif files)

What I am trying to achieve is if the user clicks 'item 3' on Page 2, it opens the new html page (page 1) with the iFrame (frameContent.htm) on it and automatically jumps down the list to Item 3.

Hope this makes sense!

domedia
05-19-2005, 01:45 PM
Does this work for you?<a href="frameContent.htm#Item1" target="itemsFrame">Link to Item1</a>

Basscadet
05-19-2005, 02:22 PM
Hi,

Cheers for the reply. That's kind of it, but I need the frameContent.htm file to live inside the iFrame.

If you don't mind I've Zipped the pages and attached them. There's only 3 pages:

main.htm (this has the links on it)

test.htm (this has the iFrame on it)

frameContent.htm (this lives inside the iFrame on the test.htm page)

What needs to happen is when you click a link on main.htm, test.htm opens and the frameContent.htm file inside the iFrame jumps to the relevant item number.

Would you mind taking a look?

Many thanks!

domedia
05-19-2005, 02:30 PM
Not that's fine, I can tell you right now that won't work with HTML. Linking to a certain place in an iframe you can do, but your scenario involves more than that. Is there any reason you have to use fraMES?

Basscadet
05-19-2005, 02:39 PM
The reason I'm using an iFrame is because the depth of the site is going to be a set amount (600px) with a banner across the top of about 200px and a content area of about 400px.

The content on that particular page will be deeper than 400px so I need to be able to scroll down the page but I don't want the banner across the top of the site to disapear, so iFrames seemed the perfect solution... at first!!

:o)