Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

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

 
Thread Tools Search this Thread
Old 02-09-2004, 03:56 AM   #1
Default iframe help - change two iframes with one click - please ignore last post no e-mail address


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>

--
Arne Hendrickson
Set-Up Guys





Arne Hendrickson
  Reply With Quote
Old 02-11-2004, 01:33 PM   #2
Steve R.
 
Posts: n/a
Default Re: iframe help - change two iframes with one click - please ignore last post no e-mail address

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.


  Reply With Quote
Old 02-12-2004, 03:54 PM   #3
Arne Hendrickson
 
Posts: n/a
Default Re: iframe help - change two iframes with one click - please ignore last post no e-mail address

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


"Steve R." <stevie_ritchie(NOSPAM)@hotmail.com> wrote in message
news:5bqWb.1970$S%...
> 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.
>
>



  Reply With Quote
Old 02-12-2004, 04:43 PM   #4
Steve R.
 
Posts: n/a
Default Re: iframe help - change two iframes with one click - please ignore last post no e-mail address

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


  Reply With Quote
Old 02-20-2004, 09:00 AM   #5
Will
 
Posts: n/a
Default Re: iframe help - change two iframes with one click - please ignorelast post no e-mail address

Arne Hendrickson wrote:

> 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 */

}
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump