Click to See Complete Forum and Search --> : How to load new content in frame_2 when changing frame_1


Hillebrand
10-16-2003, 10:17 AM
Hi there.
I have a frameset with 4 frames: left, up, main, bot.
The up_frame contains a java menu. Now I would like to send new content (html) to the bot_frame when the content of the main_frame changes by using a link or the menu.

Or different explained: I would like to have the same effekt like if I click on a link and use target="bot_frame", but without clicking, when main_frame is loaded.

Thanks in advance,
Tom

jbergthorson
10-16-2003, 10:31 AM
in your main_frame html page you can just do:

<head>
<script language="javascript">
function loadBottomFrame(){
parent.bot_frame.document.location.href="somePage.html";
}
</script>
</head>

<body onload="loadBottomFrame();">
</body>

or in your menu system, you can do the same, but call the function from the onClick events of the menu items.

hope that helps
jason

Hillebrand
10-16-2003, 10:43 AM
Hi Jason,

thank you many times - that was exactly what I was looking for !!

Regards,
Tom

jbergthorson
10-16-2003, 10:58 AM
glad i could help!