+ Reply to Thread
Results 1 to 5 of 5

Thread: iframe Troubles

  1. #1
    104lbofinsanity is offline x10Hosting Member 104lbofinsanity is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    3

    Exclamation iframe Troubles

    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!

  2. #2
    Christopher's Avatar
    Christopher is offline Retired Christopher is an unknown quantity at this point
    Join Date
    Jun 2006
    Location
    USA
    Posts
    7,330

    Re: iframe Troubles

    Moved to Programming Help

  3. #3
    Scoochi2's Avatar
    Scoochi2 is offline x10 Sophmore Scoochi2 is an unknown quantity at this point
    Join Date
    Aug 2008
    Location
    Southport!
    Posts
    185

    Re: iframe Troubles

    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"
    If anyone can see it, my post was meant for anyone who reads it. Don't take it personally or think I'm being condescending... :nuts:

  4. #4
    freecrm's Avatar
    freecrm is offline x10 Elder freecrm is an unknown quantity at this point
    Join Date
    May 2008
    Location
    UK
    Posts
    629

    Re: iframe Troubles

    Quote Originally Posted by Scoochi2 View Post
    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.

  5. #5
    104lbofinsanity is offline x10Hosting Member 104lbofinsanity is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    3

    Re: iframe Troubles

    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

+ Reply to Thread

Similar Threads

  1. iframe javascript problem
    By oracle in forum Programming Help
    Replies: 5
    Last Post: 06-29-2008, 12:56 PM
  2. Passing vars from parent to iframe
    By gottaloveit in forum Programming Help
    Replies: 8
    Last Post: 05-07-2008, 11:15 AM
  3. just how smart can an iframe get?
    By bonzo meier in forum Programming Help
    Replies: 4
    Last Post: 03-05-2008, 10:58 AM
  4. Troubles with PHP-GD
    By phobia-of-ua in forum Free Hosting
    Replies: 6
    Last Post: 01-02-2008, 06:33 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers