PDA

View Full Version : iFrames: 2 targets, 2 links, 1 click?



lilspritebubbles
01-19-2004, 11:15 AM
suppose this.
there are two iFrames in one page. (lets call them "iFrameA" and "iFrameB")
there are two pages you would like to link to within these iFrames. ("Link1" and "Link2")
i know that it is possible to put "Link1" inside of "iFrameA" and target it to "iFrameB".

but is it possible, to have a link (say perhaps a new link, "Link3") inside of "iFrameA", that when clicked, two things hapen: "Link1" is targeted within "iFrameA" and "Link2" is targeted within "iFrameB".


?

thank you all so much for your help.

julia

sma
01-20-2004, 03:25 AM
Client-side scripting can fix your desire.

1. Change link3's href to call javascript function instead of direct URL.(e.g. link3 (javascript:openWindows()))

2. And embeded the following javascript function.


<script language="Javascript">
function openWindows()
{
window.open('http://URLofLink1', 'iFrameA');
window.open('http://URLofLink2', 'iFrameB');
}
</script>