Forum Moderators: open

Message Too Old, No Replies

Linking one iframe to another...

Help...

         

emurje

2:05 am on May 16, 2003 (gmt 0)

10+ Year Member



Hello,

I'm having problems figuring out how to link one iframe page to another iframe page.

I have an index.html and in that there is iframe "main" and iframe "nav" with my navigation. How would I link the "nav" iframe links into the "main" iframe.

Thanks

asidonline

2:17 am on May 16, 2003 (gmt 0)

10+ Year Member



Use the name of your iframe in the target in your href eg:

<a href="anewpage.htm" target="main">A New Page</a>

Note: frame names are case sensitive.

HTH

emurje

2:19 am on May 16, 2003 (gmt 0)

10+ Year Member



No, that doesn't work... I've tried it many times. :(

I'm linking from inside iframe "nav" into iframe "main" That target="main" doesn't work...

asidonline

2:32 am on May 16, 2003 (gmt 0)

10+ Year Member



can you post a bit of code showing your iframe tags and your link tags?

emurje

2:39 am on May 16, 2003 (gmt 0)

10+ Year Member



What would that do?

I would just be showing iframe: nav and iframe: main

I want to use:
<a href="news.html">
That is located on iframe "nav", and I want to make news.html show up on iframe "main".

asidonline

2:52 am on May 16, 2003 (gmt 0)

10+ Year Member



Some javascript might help. try this:

<a href="" onclick="parent.main.location.href='news.html'">News</a>

(by the way, posting code often makes it easier to help.)

emurje

3:00 am on May 16, 2003 (gmt 0)

10+ Year Member



Not working....

<a href="" onclick="parent.main.location.href='news.html'">
<img border="0" src="homenav.jpg" width="109" height="14"></a>

Doesn't show up in iframe "main"... Agh :(

emurje

3:17 am on May 16, 2003 (gmt 0)

10+ Year Member



Help!? =(

MWpro

3:45 am on May 16, 2003 (gmt 0)

10+ Year Member



"I'm linking from inside iframe "nav" into iframe "main" That target="main" doesn't work..."

If you only need two iframe's on your page, why don't you just eliminate the navigation one and just keep the main one? Set it up so the links are on the left and put the iframe to the right of the links... you'll get the same effect and won't have to worry about this iframe stuff. I've seen this done on many sites and it works great.

asidonline

5:11 am on May 16, 2003 (gmt 0)

10+ Year Member



are you sure you are naming your iframe? can you post your iframe tag?

emurje

12:05 pm on May 16, 2003 (gmt 0)

10+ Year Member



<DIV id=main
style="Z-INDEX: 1; LEFT: 156px; WIDTH: 100px; POSITION: absolute; TOP: 212px">
<DIV class=main>
<iframe frameborder=0 src="news.html" width="588" height="362" name="main" > </iframe>
</DIV></DIV>

and...

<DIV id=nav
style="Z-INDEX: 1; LEFT: 43px; WIDTH: 100px; POSITION: absolute; TOP: 210px">
<DIV class=nav>
<iframe frameborder=0 src="nav.html" width="109" height="138" name="nav" > </iframe>
</DIV></DIV>

The way it's set up, I have to use the DIV coordinates, I'm making a site for this guy and after it was all complete, he told me he wanted hover buttons, and I had already made the layout one big picture so I could use a map for the links, well now I put a small iframe over the navigation buttons and put them in one by one [ I broke them off of the main picture ]. So I need to know how I can get each navigation link from "nav" to go into iframe "main".

emurje

12:13 pm on May 16, 2003 (gmt 0)

10+ Year Member



Nevermind, I figured out my own mistake, thanks for all your time. :D

pixel_juice

12:21 pm on May 16, 2003 (gmt 0)

10+ Year Member



>>I figured out my own mistake

It might be worth posting the solution in case anyone else with the same problem comes across this thread.