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

Q220 I have a frameset with four frames, when I press button in frame1, how do I get two frames (frame2 and frame3) loaded at a same time with different pages?

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

Q220 I have a frameset with four frames, when I press button in frame1, how do I get two frames (frame2 and frame3) loaded at a same time with different pages?

<script language="JavaScript"><!--
function changeFrames(url1,url2) {
    parent.frame2name.location.href = url1;
    parent.frame3name.location.href = url2;
}
//--></script>

<form>
<input type="button" value="Click Me" onClick="changeFrames('apage.html','bpage.html')">
</form>

or:

<script language="JavaScript"><!--
function changeFrames(url1,url2) {
    parent.frames[1].location.href = url1;
    parent.frames[2].location.href = url2;
}
//--></script>

<form>
<input type="button" value="Click Me" onClick="changeFrames('apage.html','bpage.html')">
</form>

Feedback on 'Q220 I have a frameset with four frames, when I press button in frame1, how do I get two frames (frame2 and frame3) loaded at a same time with different pages?'


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.