473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 4664
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: johkar | last post by:
I only have IE 6 and dial-up. Can you help me determine which browsers support this code? Thanks, John <html> <head> <title>Fixed Table Headers</title> <script language="JavaScript"...
2
by: Hugh Dickinson | last post by:
Does anybody know whether the netscape 7+ browsers support afunction similar to the internet explorer doScroll() function, this has the effect of pressing the scrollbar button, but can be scripted...
7
by: Pete | last post by:
I'm working (playing) on a mouse following script. Yes, the sort no one likes but I'm having great fun tinkering with it - sad. Anyway, if there's enough page content to cause scrolling and I...
5
by: ashutosh.bhardwaj1980 | last post by:
Hi, I amdeveloping a web site in ASP and it is a secure site. I would like someone to help me on this: -->i dont want 2 users to accesss my site with the same username parallely. --> Also...
3
by: Trent | last post by:
Hi. I know the basic way to assign event handlers: <input onKeyUp="processEvent(event)" /> But how do I assign a function to the onKeyUp event in *javascript* that can access the event...
15
by: Tony Gahlinger | last post by:
I'm using my browser (Mozilla/5.0 Linux i686 Gecko/20031007 Firebird/0.7) to do some client-side image processing. I want to capture the sequence of coordinates a user clicks on in xxx.jpg in the...
9
by: supster | last post by:
Hello, I'm trying to capture when users press the tab key. This is scrolling through different fields with tab is broken in my form. I'm not sure why, but it may have something to do with the fact...
5
by: konryd | last post by:
I want to know when a user scrolls the textarea. Since there is no such an event, I need to scroll all the ways scrolling might be invoked, that is: * by pressing keys * by moving mouse * by...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.