My user wants the heading to remain at the top of a document while scrolling thru the document. I put the heading in the top frame and the body of the document in the lower frame. I need the top frame to scroll to the right when the lower frame is scrolled. Why doesn't this script work?
<HTML>
<HEAD>
<SCRIPT language="JavaScript">
function initScrollSynchronization() {
setInterval("syncFrame()",1000);
}
function syncFrame(){
var scrollTop = chart.pageYOffset;
var scrollLeft = chart.pageXOffset;
heading.scrollTo(scrollLeft, scrollTop);
}
</SCRIPT>
</HEAD>
<FRAMESET ROWS="40%, *" ONLOAD="initScrollSynchronization()">
<FRAME NAME="heading"
SRC="heading.doc"
SCROLLING="no" noresize
frameborder=0>
<FRAME NAME="chart"
SRC="chart.doc"
SCROLLING="auto" noresize
frameborder=0>
<NOFRAMES>
</NOFRAMES>
</FRAMESET>
<HTML>
<HEAD>
<SCRIPT language="JavaScript">
function initScrollSynchronization() {
setInterval("syncFrame()",1000);
}
function syncFrame(){
var scrollTop = chart.pageYOffset;
var scrollLeft = chart.pageXOffset;
heading.scrollTo(scrollLeft, scrollTop);
}
</SCRIPT>
</HEAD>
<FRAMESET ROWS="40%, *" ONLOAD="initScrollSynchronization()">
<FRAME NAME="heading"
SRC="heading.doc"
SCROLLING="no" noresize
frameborder=0>
<FRAME NAME="chart"
SRC="chart.doc"
SCROLLING="auto" noresize
frameborder=0>
<NOFRAMES>
</NOFRAMES>
</FRAMESET>