470,599 Members | 1,460 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,599 developers. It's quick & easy.

Firefox onscroll

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!
Sep 27 '05 #1
1 12740

Simon Wigzell <si**********@shaw.ca> wrote in message news:96g_e.269528$Hk.230298@pd7tw1no...
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>

--
S.C.


Sep 28 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by viza | last post: by
2 posts views Thread by Mark Szlazak | last post: by
5 posts views Thread by Simon Wigzell | last post: by
1 post views Thread by Jeremy | last post: by
reply views Thread by Jocker | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.