SPECIAL TOPICS > Iframes in detail

How do i create two link sets (each link set change two iframe windows)

(1/1)

pvo:
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.

Samrc:
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: ---<script language="javascript">
function loadTwo(iframe1URL, iframe2URL)
{
parent.FRAME1.location.href=iframe1URL
parent.FRAME2.location.href=iframe2URL
}
</script>
--- End code ---

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


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

And your links would look like this:

--- Code: ---<a href="javascript:loadTwoB('special3.htm','special4.htm')">special link</a>
--- End code ---

Lucindar:
Your posts make me have much more knowledge that I never knew before.   

Navigation

[0] Message Index

Go to full version