window.onscroll and firefox

G

Gérard Talbot

Simon Wigzell wrote :
Looks like firefox doesn't support onscroll. Any workaround?

Not true. Firefox support scroll event as specified by DOM 2 Events
(document) and DOM 3 Events (element).

Gérard
 
S

Simon Wigzell

Gérard Talbot said:
Simon Wigzell wrote :

Not true. Firefox support scroll event as specified by DOM 2 Events
(document) and DOM 3 Events (element).

Gérard

Well - then why does the following work (you get the alert when you move the
scroll bar) for IE, Netscape and Opera but not firefox?

<html>
<body>
<script language="JavaScript1.2">
window.onscroll = doOnScroll;

function doOnScroll()
{
alert("doOnScroll");
}
</script>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
</body>
</html>
 
L

Lee

Simon Wigzell said:
Well - then why does the following work (you get the alert when you move the
scroll bar) for IE, Netscape and Opera but not firefox?

<html>
<body>
<script language="JavaScript1.2">

You're specifically telling it to only load the code in browsers
that are running Javascript version 1.2. That's not a good idea.

<script type="text/javascript">
 
G

Gérard Talbot

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top