Vikram Bhatia wrote:
1. Is there an event to capture scrolling using mouse wheel in
Netscape 6.x?
There does not appear to be, document.onscroll does not fire when using
the mouse wheel, even in Firefox 1.0PR.
<script type="text/javascript">
document.onscroll = function() {
window.status = window.pageXOffset + ';' + window.pageYOffset;
return true;
}
var i = 100;
while (i-- > 0) {
document.write('<div style="height:100px;>' + i + '</div>');
}
</script>
2. When arrow keys are used to scroll a page in Netscape 6.x, the
scrolling offsets obtained using 'window.pageXOffset' and
'window.pageYOffset' are not correct. Is there any other way to get
the correct scrolling offsets?
They appear correct in Firefox 1.0PR, Mozilla 1.7.3 and Mozilla 1.0.2
(the oldest version I've got, Netscape 6 might be based on an earlier
Milestone however):
<script type="text/javascript">
function timed() {
window.status = window.pageXOffset + ';' + window.pageYOffset;
return true;
}
var i = 100;
while (i-- > 0) {
document.write('<div style="height:100px;>' + i + '</div>');
}
setInterval('timed()', 2000);
</script>
--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ -
http://jibbering.com/faq