iframe help - change two iframes with one click - please ignore last post no e-mail address

  • Thread starter Arne Hendrickson
  • Start date
A

Arne Hendrickson

Can anyone tell me how to edit this script for "traditional frames" to work
with iframes?

SCRIPT language="JavaScript">
<!----hide
function change2()
{
parent.left_frame.location="page3.htm";
parent.right_frame.location="page4.htm";
}
//------>
</SCRIPT>
 
S

Steve R.

Arne Hendrickson wrote in message ...
Can anyone tell me how to edit this script for
"traditional frames" to work with iframes?

You haven't given enough information. Are you asking if it's possible to
add an iframe on a framed page or what?

An URL would be helpful.
 
A

Arne Hendrickson

No I want to change the contents of two iframes from one link. I have a menu
bar at the top of the page and two iframes one with text and one with
pictures. I want both iframes to update from one link. I know how to do this
using "traditional frames" but the syntax seem to be different for iframes
and I haven't been able to find anything about it on any of the tutorial
sites or at http://www.w3.org/

The url is: www.sunsetinn-tours.com

Thanks in advance.
Arne
 
S

Steve R.

Arne Hendrickson wrote in message ...
I want to change the contents of two iframes from one link.
The url is: www.sunsetinn-tours.com

I can see what you want to achieve now, but I don't know how to do it with
simple HTML. Maybe others can help.

It can be done with CSS if you can understand the mark-up from the two URLs
below which demonstrate that one click can change text content and image
content in two separate areas on a page.

Click on these courtesy of *Brucie* ...

http://www.porjes.com/butterflies

http://butterflies.bruciesusenetshit.info
 
W

Will

Arne said:
Can anyone tell me how to edit this script for "traditional frames" to work
with iframes?

SCRIPT language="JavaScript">
<!----hide
function change2()
{
parent.left_frame.location="page3.htm";
parent.right_frame.location="page4.htm";
}
//------>
</SCRIPT>



I can give you something non-specific. Adapt as you need it:

In the body:

<iframe src="One.html" name="Freddie"></iframe>
<iframe src="aDifferentOne.html" name="Francis"></iframe>

The link:

<a href="#" onClick="change2()">Link me up, baby!</a>

The code:

function change2(){

document.Freddie.src="Two.html";
document.Francis.src="aDifferentTwo.html";
/* Cut n' paste URLs as you like it */

}



If you want to change both from INSIDE one of the i-frames (in my
example, lets say 'Freddie'), then change the link to:

<a href="Two.html" onClick="change2()">Link me all over!</a>

And remove the first line of code in the function, edit the second, to
make it:

function change2(){

parent.Francis.src="aDifferentTwo.html";
/* Cut n' paste URLs as you like it */

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top