iframe Troubles

104lbofinsanity

New Member
Messages
3
Reaction score
0
Points
0
I just wanted to ask a simple question. I haven't made websites in so long, I seem to have forgotten.

Okay, on my homepage, I have two iframes. One is name="featured" and it is set to start as a picture. The second is name="select" and it is set to a page that has a few thumbnails scrolling across. I have the thumbnails set to target="featured".

Am I mistaken, or shouldn't a click of one of the thumbnails change the "featured" iframe to the new picture? I guess my main question is can you have links to an iframe on a completely separate page. I thought so, but that is the only reason I can think of for my code to not work.

If someone wants to try and help me find my problem, it would be really apretiated. I will share my HTML code on request. Thanks for the help everyone!
 

Scoochi2

New Member
Messages
185
Reaction score
0
Points
0
The iframe is not actually part of the document like a normal frameset. It is simply a document embedded in another. (I think, can someone say yes or no to this?)

I think the only way you can get around this is by using JavaScript. And even then, it won't work for all users (such as people with JS disabled).
I'm not too nifty with JS, but you should be able to change the second iframe from the first by using
parent.otheriframe.src = "http://changetothis.com"
 

freecrm

New Member
Messages
629
Reaction score
0
Points
0
The iframe is not actually part of the document like a normal frameset. It is simply a document embedded in another. (I think, can someone say yes or no to this?)

I think the only way you can get around this is by using JavaScript. And even then, it won't work for all users (such as people with JS disabled).
I'm not too nifty with JS, but you should be able to change the second iframe from the first by using
parent.otheriframe.src = "http://changetothis.com"

Absolutely right Scoochi. By clicking a hyperlink in an iframe, you are simply asking the browser to process a redirect script and will not in itself alter the parameters for another iframe.

One question: how is your "featured" iframe page laid out? You say it loads one image but is that all there is on that page? If so, the "select" iframe can't make the change anyway.

The use of iframes has died off in recent years in favour of includes, flash files and the like.

Your best route, as Scoochi says, is JS.
 

104lbofinsanity

New Member
Messages
3
Reaction score
0
Points
0
My featured iframe is directly linked to an image file (.jpg) The pictures in the selected iframe are asked to open a larger version of themselves (another .jpg file) into the featured iframe.

Oh, and I'll check out some JS stuff, thanks
 
Top