Results 1 to 7 of 7

Thread: iFrame help

  1. #1
    Join Date
    Jul 2009
    Location
    Washington (USA)
    Posts
    94
    Thanks
    3
    Thanked 3 Times in 3 Posts

    Question iFrame help

    Hello

    I could use some help with iFrames. I have a page with an iframe and the external file that the iframe shows is a list of links to videos i have. Is it possible to click some link that opens the page with the iframe showing a different page?

    Example:

    Open the Page Normally:
    HTML Code:
    <a href="http://www.mydomain.com/videos/home.html">
    Open the page with the iframe showing a different page:
    HTML Code:
    <a href="http://www.mydomain.com/videos/home.html#page-name">
    OR
    HTML Code:
    <a href="http://www.mydomain.com/videos/home.html" onclick="iframe.page=page-name">
    Is it possible to do something like this???
    Last edited by kaos; 08-23-2009 at 01:02 AM.

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    I'm not really sure what you mean when you say "Is it possible to click some link that opens the page with the iframe showing a different page?"

    Are the links outside of the Iframe (on the main page) and you want the pages to load inside the Iframe?

    Or do you mean you have links on page 1, that when clicked-on, open page 2which has an Iframe, with X page loaded already into it?

    Can we see your file/page structure? Can you provide a link of what you have already?

  3. #3
    Join Date
    Jul 2009
    Location
    Washington (USA)
    Posts
    94
    Thanks
    3
    Thanked 3 Times in 3 Posts

    Default Sorry

    Sorry that your confused, I am too. The page with the iframe is here: http://www.fireflytv.net/channels/naruto. I want to give a link to someone but have the iframe showing a different page (ex: as though a ink in the iframe as been clicked on page load) if they arrived by clicking the link.

    Example of narmal link:
    HTML Code:
    <a href="http://www.fireflytv.net/channels/naruto">Click here</a>
    What i'm looking for:
    HTML Code:
    <a href="http://www.fireflytv.net/channels/naruto" onClick="iframe.src='new-url'">Click me<a/>
    Does that help?

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    I think I understand - I believe this forum discussion will help you (there is example code to copy and paste: http://www.hotscripts.com/forums/htm...nk-iframe.html

  5. The Following User Says Thank You to Beverleyh For This Useful Post:

    kaos (08-18-2009)

  6. #5
    Join Date
    Jun 2009
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    make your target = your frame name in the main page.

    [ICODE]<a href="pages/iframe.html" target="iframe_contents"><h2>Refresh vendor list</h2></a>



    <!---Beginning iframe content--->

    <iframe name="iframe_contents"
    <iframe id="iframe_contents" width="380" padding="20px" height="400" frameborder="0"
    scrolling="no" allowtransparency="true" src="pages/iframe.html"></iframe>


    <!---End iframe content---> [CODE]

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

    Default

    <a href="pages/iframe.html" target="iframe_contents"><h2>Refresh vendor list</h2></a>



    <!---Beginning iframe content--->

    <iframe name="iframe_contents"
    <iframe id="iframe_contents" width="380" padding="20px" height="400" frameborder="0"
    scrolling="no" allowtransparency="true" src="pages/iframe.html"></iframe>


    <!---End iframe content--->

  8. #7
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    I posted something on the subject here.
    Right now, the demo-link I provided there is broken, so here's another link:
    http://molendijk.freei.me/include_mo..._onthefly.html
    ===
    Arie Molendijk.

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
  •