Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Help ! Coding Iframe

    Hi all,

    I am a newbee on javascript and I need your help.

    I prepared a popup menu with javascript. There is two iframe on the page.I want both of them to reload at the same time when a menu item is clicked. Is this possible ? How is the coding ?

    I am not sure if I used the right terminology because of my poor english.
    I hope It is clear and understanble.

    Thank you in advance.

    maviye dogru

  • #2
    New Coder
    Join Date
    May 2005
    Location
    New Zealand
    Posts
    76
    Thanks
    0
    Thanked 6 Times in 6 Posts
    If the popup menu is in one of the iframes then you will need to do something like the following in the onClick for the popup menu.

    Code:
    onClick="{self.location='page1.html'; otherIframe.location='page2.html';}"
    Replace 'otherIframe' with the name of the other iframe.

    The first bit changes the location of the iframe that the popup menu is in and the second bit changes the location of the other iframe.

    If the menu is not in one of the iframes then the code would be more like this:
    Code:
    onClick="{iFrameOne.location='page1.html'; iFrameTwo.location='page2.html';}"
    I have not tested this so it might not be 100% correct, but something like this should work.

    Cheers

  • #3
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Or

    <a href="page1.htm" target="iframe1" onclick="window.frames['iframe2'].location='page2.htm'">Load Iframes</a>
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #4
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks.


  •  

    Posting Permissions

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