By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,257 Members | 928 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,257 IT Pros & Developers. It's quick & easy.

Capturing scrolling event in Netscape 6.x

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.