...

View Full Version : change content of multiple frames?



alterna180
02-08-2004, 02:24 AM
help!? yes, i am very new... i cant figure out why this isnt working. i am trying to get 4 different html pages to load into different frames. with the code below, only the content_frame pages loads. the three staff pages stay the same.

<html>
<head>
<script language = "JavaScript">
<!-- hide
function changeFrames(content_frame, staff_one, staff_two, staff_three)
{
parent.content.location = content_frame;
parent.billy.location = staff_one;
parent.joel.location = staff_two;
parent.matt.location = staff_three;
}
// show -->
</script>
</head>
<body>
<font face="verdana, arial, helvetica, sans-serif" size=1 color="#333333">
<a href = "#" onClick = "changeFrames('a.room.html','billyNAV.html','joel.html','matt.html'); return false;">A ROOM</a><br>
<a href = "#" onClick = "changeFrames('b.room.html','billy.html','joelNAV.html','matt.html'); return false;">B ROOM</a><br>
<a href = "#" onClick = "changeFrames('c.room.html','billy.html','joel.html','mattNAV.html'); return false;">C ROOM</a><br>
</font>
</body>
</html>

Antoniohawk
02-08-2004, 05:07 AM
Well this page doesn't contain any frames, it must be in a frame itself. Can I see the code for the main page, the one containing the actualy frames?

glenngv
02-09-2004, 03:22 AM
You should post the frameset page for us to see the structure of your frames.

But using window.open will work whatever frame structure you have.

function changeFrames(content_frame, staff_one, staff_two, staff_three)
{
window.open(content_frame,"content");
window.open(staff_one,"billy");
window.open(staff_two,"joel");
window.open(staff_three,"matt");
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum