You are here: irt.org | FAQ | JavaScript | Frame | Q220 [ previous next ]
<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?'