Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q340 Can I change the location of two frames with just one click?

irt.org | Knowledge Base | JavaScript | Frame | Q340 [ previous next ]

Q340 Can I change the location of two frames with just one click?

This can be achieve in two ways: either by loading another frameset in place of the original:

<A HREF="anotherframeset.html" TARGET="_parent">replace two frames with two others</A>

or using JavaScript you can alter the content of as many frames as you like:

<SCRIPT LANGUAGE="JavaScript"><!--
function change(url1,url2) {
    parent.frames[0].location.href = url1;
    location.href = url2; // always change the location of the current window last
}
//--></SCRIPT>

<A HREF="javascript:change('http://www.irt.org/','http://www.netscape.com/')">change the contents of two frames</A>

Feedback on 'Q340 Can I change the location of two frames with just one click?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.