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

Firefox onscroll

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


P: n/a

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.