iframe help - change two iframes with one click - please ignore last post no e-mail address

Discussion in 'HTML' started by Arne Hendrickson, Feb 9, 2004.

  1. Can anyone tell me how to edit this script for "traditional frames" to work
    with iframes?

    SCRIPT language="JavaScript">
    <!----hide
    function change2()
    {
    parent.left_frame.location="page3.htm";
    parent.right_frame.location="page4.htm";
    }
    //------>
    </SCRIPT>

    --
    Arne Hendrickson
    Set-Up Guys
    Arne Hendrickson, Feb 9, 2004
    #1
    1. Advertising

  2. Arne Hendrickson

    Steve R. Guest

    Arne Hendrickson wrote in message ...
    > Can anyone tell me how to edit this script for
    > "traditional frames" to work with iframes?


    You haven't given enough information. Are you asking if it's possible to
    add an iframe on a framed page or what?

    An URL would be helpful.
    Steve R., Feb 11, 2004
    #2
    1. Advertising

  3. No I want to change the contents of two iframes from one link. I have a menu
    bar at the top of the page and two iframes one with text and one with
    pictures. I want both iframes to update from one link. I know how to do this
    using "traditional frames" but the syntax seem to be different for iframes
    and I haven't been able to find anything about it on any of the tutorial
    sites or at http://www.w3.org/

    The url is: www.sunsetinn-tours.com

    Thanks in advance.
    Arne


    "Steve R." <stevie_ritchie(NOSPAM)@hotmail.com> wrote in message
    news:5bqWb.1970$S%...
    > Arne Hendrickson wrote in message ...
    > > Can anyone tell me how to edit this script for
    > > "traditional frames" to work with iframes?

    >
    > You haven't given enough information. Are you asking if it's possible to
    > add an iframe on a framed page or what?
    >
    > An URL would be helpful.
    >
    >
    Arne Hendrickson, Feb 12, 2004
    #3
  4. Arne Hendrickson

    Steve R. Guest

    Arne Hendrickson wrote in message ...
    > I want to change the contents of two iframes from one link.
    > The url is: www.sunsetinn-tours.com


    I can see what you want to achieve now, but I don't know how to do it with
    simple HTML. Maybe others can help.

    It can be done with CSS if you can understand the mark-up from the two URLs
    below which demonstrate that one click can change text content and image
    content in two separate areas on a page.

    Click on these courtesy of *Brucie* ...

    http://www.porjes.com/butterflies

    http://butterflies.bruciesusenetshit.info
    Steve R., Feb 12, 2004
    #4
  5. Arne Hendrickson

    Will Guest

    Re: iframe help - change two iframes with one click - please ignorelast post no e-mail address

    Arne Hendrickson wrote:

    > Can anyone tell me how to edit this script for "traditional frames" to work
    > with iframes?
    >
    > SCRIPT language="JavaScript">
    > <!----hide
    > function change2()
    > {
    > parent.left_frame.location="page3.htm";
    > parent.right_frame.location="page4.htm";
    > }
    > //------>
    > </SCRIPT>
    >




    I can give you something non-specific. Adapt as you need it:

    In the body:

    <iframe src="One.html" name="Freddie"></iframe>
    <iframe src="aDifferentOne.html" name="Francis"></iframe>

    The link:

    <a href="#" onClick="change2()">Link me up, baby!</a>

    The code:

    function change2(){

    document.Freddie.src="Two.html";
    document.Francis.src="aDifferentTwo.html";
    /* Cut n' paste URLs as you like it */

    }



    If you want to change both from INSIDE one of the i-frames (in my
    example, lets say 'Freddie'), then change the link to:

    <a href="Two.html" onClick="change2()">Link me all over!</a>

    And remove the first line of code in the function, edit the second, to
    make it:

    function change2(){

    parent.Francis.src="aDifferentTwo.html";
    /* Cut n' paste URLs as you like it */

    }
    Will, Feb 20, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Me
    Replies:
    0
    Views:
    396
  2. Me
    Replies:
    0
    Views:
    420
  3. sangram
    Replies:
    16
    Views:
    1,959
  4. bob
    Replies:
    2
    Views:
    266
    Jack Klein
    Feb 12, 2006
  5. Arne Hendrickson

    iframe help - change two iframes with one click

    Arne Hendrickson, Feb 11, 2004, in forum: Javascript
    Replies:
    3
    Views:
    119
    Evgeny
    Feb 13, 2004
Loading...

Share This Page