...

View Full Version : Help ! Coding Iframe



maviyedogru
01-10-2007, 09:28 AM
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

DougMck
01-11-2007, 04:48 AM
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.



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:


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

Mr J
01-11-2007, 02:58 PM
Or

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

maviyedogru
01-18-2007, 02:55 PM
Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum