Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: iFrame Target: Linking from an external page.

  1. #1
    Join Date
    Jun 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default iFrame Target: Linking from an external page.

    Hey Everyone.

    I have been researching this for so long and can not find the solution to my problem:

    This question involves 2 pages: "Page A" - the Home page and "Page B" - the Detail page.

    Page B consists of three elements: (1) A Main iFrame (2) A Navigation iFrame, and (3) a Content iFrame.

    I need to OPEN a link from the "News" iFrame on the Home page (Page A) INSIDE the CONTENT iFRAME of the Detail page (Page B).

    I have searched High and Low and can not find where this is possible.

    Please help as soon as possible.

    Thanks in advance.

    //web_junkie

  2. #2
    Join Date
    Jun 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Not sure how long it takes to get a reply, but if anyone is home - please answer ASAP.

    Thanks Again!

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Missed this one the first time around. I hope that all your iframes have names. If not, make sure they each have a unique name, ex:

    HTML Code:
    <iframe name="mainFrame" src="whatever.htm"></iframe>
    Then from anywhere on the page or from anywhere on any of the pages in any of the iframes you should be able to do this:

    HTML Code:
    <a href="someother.htm" target="mainFrame">Some Link</a>
    And it will load into the frame with that name.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jun 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    Missed this one the first time around. I hope that all your iframes have names. If not, make sure they each have a unique name, ex:

    HTML Code:
    <iframe name="mainFrame" src="whatever.htm"></iframe>
    Then from anywhere on the page or from anywhere on any of the pages in any of the iframes you should be able to do this:

    HTML Code:
    <a href="someother.htm" target="mainFrame">Some Link</a>
    And it will load into the frame with that name.
    Hi jscheuer1 - Naming the frames is the part I have working. I just cant get a link from a completely different page (PAGE A) to open a specific page in the content frame of (PAGE B)

    I will post the actual work so that you can see what I am trying to accomplish:

    http://www.somesite.com

    The NEWS in the lower frame has to open the Wheels page with the specified manufacturer in the CONTENT FRAME. As if you clicked Wheels, then clicked Lowenhart.

    Thanks Again for the prompt response JScheuer1 !!!!
    Last edited by web_junkie; 06-04-2006 at 01:21 AM.

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    ...it's working...
    ...?
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    None of your iframes have names.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Jun 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the help guys! And Thank you for responding so quickly!

    Quote Originally Posted by jscheuer1
    None of your iframes have names.
    Sure they do, this is how the links know to open in the main content frame.

    Quote Originally Posted by djr33
    ...it's working...
    ...?
    It works if you are on the same page. I am trying to get the link on the home page to open in the CONTENT FRAME of the Wheels page.

    Is this even possible?

  8. #8
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I think the main issue here is that you want two actions to happen.

    you can't click a link, get transfered to a new page, THEN have another link open, based on one click.

    At least in html, that is.


    If you can use php, you could do this:

    Your link:
    Code:
    <a href="wheels.php?iframe=page.ext"
    On your wheels page, here is (part of) the iframe tag:
    Code:
    <iframe ..... src="<?php echo $_GET['iframe']; ?>">
    That will set the iframe's src to "page.ext"

    Note that the wheels page MUST be a php page, ie, have a .php extension and you need php installed on your server.
    The first page just uses a normal link, but with ?variable=value at the end, so that can just be html. And the page included in the iframe can be html as well. (they could both be php as well, won't matter)


    there are similar ways to use that type of link with javascript, and maybe other ways, but I don't know them.


    Is this what you're wanting?
    Last edited by jscheuer1; 01-13-2010 at 08:17 AM. Reason: format code
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by web_junkie
    Thanks for the help guys! And Thank you for responding so quickly!

    Quote:
    Originally Posted by jscheuer1
    None of your iframes have names.

    Sure they do, this is how the links know to open in the main content frame.

    It works if you are on the same page. I am trying to get the link on the home page to open in the CONTENT FRAME of the Wheels page.

    Is this even possible?

    From your source of the link you supplied:

    HTML Code:
    <iframe src="news.html" frameborder="0" scrolling="auto" width="238" height="100" title="Ades News"> News </iframe>
    <iframe src="specials.html" frameborder="0" scrolling="auto" width="238" height="100" title="Specials"></iframe>
    <iframe src="feat_prod.html" frameborder="0" scrolling="auto" width="238" height="100" title="Featured Product"></iframe>
    Only three iframes, no names.
    Last edited by jscheuer1; 06-04-2006 at 03:07 AM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    John, looks like the iframes on (only) the wheels page are named.

    web junkie, you really should just get in the habit of naming all the frames, though... it'll come in handy.... no need to fix later.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •