Author Topic: How do i create two link sets (each link set change two iframe windows)  (Read 3111 times)

Offline hidden

  • ???
  • Posts: 1
  • I am new here.
I was reading an iframe tutorial on how to create a link (or link set) that changes two iframes.
http://www.samisite.com/test-csb2nf/id82.htm

Suppose my page has 4 iframes:
link set "myframe1", "myframe2","myframe3",... is for iframes called "FRAME1" and "FRAME2"
link set "mygallery1", "mygallery2","mygallery3",...  is for iframes called "GALLERY1" and "GALLERY2"

How can I modify the code in the URL to achieve my goal of 2 link sets with 4 iframes (1 link set per 2 iframes)

Thank you so much.

Offline hidden

  • Sami
  • Administrator
  • Senior Member
  • *****
  • Posts: 5924
  • Not a geek. Just a Nerd.
    • CSB Tutorials
Re: How do i create two link sets (each link set change two iframe windows)
« Reply #1 on: November 21, 2011, 10:09:55 PM »
Put two sets of codes into your web page. The FIRST set is exactly as I have shown in the sample with: loadTwo as the function name.
Code: [Select]
<script language="javascript">
function loadTwo(iframe1URL, iframe2URL)
{
parent.FRAME1.location.href=iframe1URL
parent.FRAME2.location.href=iframe2URL
}
</script>

The second set will use a different function name and definition:   loadTwoB
And the code would look like this:

Code: [Select]
<script language="javascript">
function loadTwoB(iframe3URL, iframe4URL)
{
parent.GALLERY1.location.href=iframe3URL
parent.GALLERY2.location.href=iframe4URL
}
</script>

And your links would look like this:
Code: [Select]
<a href="javascript:loadTwoB('special3.htm','special4.htm')">special link</a>
-Samantha
TNG: "Sometimes, you can make no mistakes, do everything right, and still lose" - Capt Picard to Data
(:turtle: In memory of Turtle: May 22, 1944 - Nov 24, 2007  GURU, mentor, and really nice guy! :turtleleft: )

Offline hidden

  • ???
  • Posts: 1
  • I am new here.
Re: How do i create two link sets (each link set change two iframe windows)
« Reply #2 on: November 26, 2014, 04:02:58 AM »
Your posts make me have much more knowledge that I never knew before.