B
Big Daddy
I have a simple page with 2 frames and want to be able to change the
source for the frames with javascript. See this source:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
window.frames[0].location='something';
window.frames[1].location='whatever';
</SCRIPT>
</HEAD>
<frameset ID="aFrameset" rows='103px,100%'>
<frame noresize='0' scrolling='no' name='top' id='top'>
<frame noresize='0' scrolling='yes' name='bottom' id='bottom'>
</frameset>
</HTML>
The code causes an error because the frames array doesn't have any
frames in it. I try to access the frames using their name or ID
instead (e.g. getElementById), but that doesn't work either. I have
tried to move the javascript to be after the frames declaration, but
it doesn't get called at all. I am using IE 7.
Any ideas how I can do this? thanks in advance,
John
source for the frames with javascript. See this source:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
window.frames[0].location='something';
window.frames[1].location='whatever';
</SCRIPT>
</HEAD>
<frameset ID="aFrameset" rows='103px,100%'>
<frame noresize='0' scrolling='no' name='top' id='top'>
<frame noresize='0' scrolling='yes' name='bottom' id='bottom'>
</frameset>
</HTML>
The code causes an error because the frames array doesn't have any
frames in it. I try to access the frames using their name or ID
instead (e.g. getElementById), but that doesn't work either. I have
tried to move the javascript to be after the frames declaration, but
it doesn't get called at all. I am using IE 7.
Any ideas how I can do this? thanks in advance,
John