Log in

View Full Version : How to change content in multiple frames with a click



SusanM5
04-07-2020, 05:25 AM
Hi John,

I hope you are still around, I have been using the same code that you put up, and had no trouble with it...


<a href="some.htm" target="iframeone"
onclick="window.frames['iframetwo'].location.href='some_2.htm';return true;"
>Whatever</a>

However, what I am trying to achieve is to click on "Whatever" and for it to automatically display three content (htm) in three iframes, this is the code that I've been trying to work out but it doesn't seem to work:


<a href="some.htm" target="iframeone"
onclick="window.frames['iframetwo'].location.href='some_2.htm';return true;","window.frames['iframethree'].location.href='some_3.htm';return true;"
>Whatever</a>

The comma in the middle doesn't seem to work... what is the correct code to use? I know it's something very simple, but can't quite get it. The reason for three iframes is I'm making it for educational purposes.

Thanks.

james438
04-07-2020, 03:19 PM
John passed away nearly a year and a half ago. As a general rule, if it has been more than a couple months since anyone has posted in a thread, you should start a new thread. If you need to reference the old thread, please post a reference link (http://www.dynamicdrive.com/forums/showthread.php?2529-How-to-change-2-iframes-with-one-click-in-a-3rd-frame).

SusanM5
04-11-2020, 10:38 AM
John passed away nearly a year and a half ago. As a general rule, if it has been more than a couple months since anyone has posted in a thread, you should start a new thread. If you need to reference the old thread, please post a reference link (http://www.dynamicdrive.com/forums/showthread.php?2529-How-to-change-2-iframes-with-one-click-in-a-3rd-frame).

I am sorry to hear about John passed away. I have since found out an answer to my question.

Thanks for the heads up about posting a new post if the thread is a couple months old.