Forum Moderators: mack

Message Too Old, No Replies

iframes navigation from diffrent frame.

Changing iframe content from a frame

         

coolthing

10:01 am on Apr 23, 2004 (gmt 0)

10+ Year Member



Well the site has 2 frame columns, one for the menu and another for the page.

<frameset cols="162,*" border="0">
<frame src="xmenu.html">
<frame src="display.html" name="display_frame">
</frameset>

The menu links are using the onClick function.
<html>
<script>
function pagechange1()
{
}
function pagechange2()
{
}
</script>

<table>
<tr onClick="pagechange1()"><td>Link 1</td></tr>
<tr onClick="pagechange2()"><td>Link 2</td></tr>
</table>
</html>

The other frame(display.html) is made into 2 iframes( code below ).The top iframe will remain the same, while the one beneath (named "mainpage") will change.

So using the menu,how do i send the inforantion to the other frame so that when a link on the menu is clicked on the 2nd iframe will change.

<html>
<body topmargin="0" leftmargin="0" rightmargin="0" bgcolor="#ccccff">

<table width="100%" border="0" cellspacing="1" cellpading="0" bgcolor="#000000">
<tr bgcolor="#ccccff" ><td width="100%">
<iframe src="xheader.html"name="header" width="100%" border="0" height=99"
marginwidth=0 marginheight=0 hspace=0 vspace=0
frameborder=0 border=0
></iframe>
</td></tr>

<tr bgcolor="#ccccff"><td width="100%">
<iframe src="xwelcome.html" name="mainpage" width="100%" height=1000
marginwidth=0 marginheight=0 hspace=0 vspace=0
frameborder=0 border=0></iframe>
</td></tr>
</table>
</html>

ktwilight

11:01 pm on May 6, 2004 (gmt 0)

10+ Year Member



if i understand correctly...here's the solution... ^^;
a quick search on google [google.com] gives ya examples on how to change both frames when ya click on it...

if ya just wanting to change one frame at a time, there's no need to use javascript, ya could have just used the <a href> tag inside the <td> tag... ^^;
do remember ya have to include <a href="" target="framename"> that into the code... ^^