Changing Multiple Frames from a Single Click
syllabus | schedule | assignments | Web Resources | ARTC courses
[Intro]     [Tags]     [CSSStyles]     [Lists]     [Links]     [ImageTypes]     [Optimization]    [GlobalCSS]     [CSSBackgrounds]
[Tables]     [Slices]     [IR Rollovers]     [Animated GIFs]     [JS Rollovers]     [CSS Margins]     [Windows]     [Video]     [Metatags]     [Imagemaps]     [FormInput]     [FormAtttributes]    [AdvancedForms]    [WhatisJavaScript]    [Windows2]    [Windows3]    [BrowserInfo]    [StatusBar]    [Alerts]    [Randomness]    [Frames]    [iFrames]    [Frames2]   
Sample-click here

Between the HEAD tags of the file containing the link that will change the corresponding frames, type:


function openLinks(targetFrameName1, targetURL1, targetFrameName2, targetURL2)

top.frames[targetFrameName1].document.location.href = targetURL1;

top.frames[targetFrameName2].document.location.href = targetURL2;



Between the BODY tags of the same file, call the function in your LINK tag:

<a href="#" onClick="openLinks('leftFrame', 'link1.html', 'mainFrame', 'link2.html')">LINK</a>