471,595 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,595 software developers and data experts.

Capturing scrolling event in Netscape 6.x

1. Is there an event to capture scrolling using mouse wheel in
Netscape 6.x?

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?
Jul 23 '05 #1
3 4536
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

Jul 23 '05 #2
DU
Grant Wagner wrote:
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.


That's because of bug 189308.
http://bugzilla.mozilla.org/show_bug.cgi?id=189308

But if you try this page

http://www10.brinkster.com/doctorunc...rollEvent.html

with NS 7.0 , you'll see that mousewheel rolling will trigger, will fire
the scroll event.
There is also a DOMMouseScroll event as an event.type which is the
equivalent of mousewheel event in IE's DOM event.

<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.
That's exactly bug 189308. The pageX/YOffset values are not updated.

Is there any other way to getthe 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):


They will *not* with arrow keys, mousewheel rolling and autoscroll. (But
they will when using mouse to drag the scrollbar thumb or click the
scrollbar arrows.) The scroll event is fired when using arrow keys,
PgDn/Up, Home key but the window.pageX/YOffset values are not updated:
bug 189308.

<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


Vikram and you should vote for bug 189308 :)
Btw, Grant, I may have a question for you. I've took bug 74952 as an
assignement
https://bugzilla.mozilla.org/show_bug.cgi?id=74952
and I'd be interested to hear suggestions you may have about the document
http://www.mozilla.org/docs/web-deve...upgrade_2.html

DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.3 :)
Jul 23 '05 #3
DU
Vikram Bhatia wrote:
1. Is there an event to capture scrolling using mouse wheel in
Netscape 6.x?

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?


The firing of scroll event started only with version 7.0.

https://bugzilla.mozilla.org/show_bug.cgi?id=35011#c64

DOMMouseScroll (mousewheel rolling event) also started with NS 7.0.

Vikram, you can vote for bug 189308 by creating an account:

https://bugzilla.mozilla.org/createaccount.cgi

and then voting here:
https://bugzilla.mozilla.org/votes.c...&bug_id=189308

DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.3 :)
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Hugh Dickinson | last post: by
7 posts views Thread by Pete | last post: by
5 posts views Thread by ashutosh.bhardwaj1980 | last post: by
3 posts views Thread by Trent | last post: by
15 posts views Thread by Tony Gahlinger | last post: by
9 posts views Thread by supster | last post: by
5 posts views Thread by konryd | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.