Firefox onscroll

S

Simon Wigzell

Firefox has strange behaviour with onscroll. I have a sample page here:
http://www.dynamicwebsitesystems.com/ScrollTest.htm

If I make this the startup page for the firefox browser or launch it from
Frontpage with Preview then the onscroll works - it calls the doOnScroll
function and posts the alert when you move the scroll bar. It doesn't work
if you go to this page from another page or if you refresh the page. What is
going on here? Any way to make it work all the time?

Thanks!
 
S

Stephen Chalmers

Simon Wigzell said:
Firefox has strange behaviour with onscroll. I have a sample page here:
http://www.dynamicwebsitesystems.com/ScrollTest.htm

If I make this the startup page for the firefox browser or launch it from
Frontpage with Preview then the onscroll works - it calls the doOnScroll
function and posts the alert when you move the scroll bar. It doesn't work
if you go to this page from another page or if you refresh the page. What is
going on here? Any way to make it work all the time?

Thanks!


It's clumsy to display an alert for every event.
I can't test this, but try writing it like this:

<script type="text/javascript">

function doOnScroll()
{
window.onscroll=null;
alert("Scrolled");
}

window.onscroll = doOnScroll;

</script>
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top