473,811 Members | 3,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 12911

Simon Wigzell <si**********@s haw.ca> wrote in message news:96g_e.2695 28$Hk.230298@pd 7tw1no...
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
10490
by: viza | last post by:
Hi! I use the onscroll event to make something like the CSS position:fixed; for MSIE. In MSIE/5.5, before a function is assigned to the event handler, it has the value null. In Opera, it is undefined, because Opera doesn't support this event. I use:
5
3673
by: Mark | last post by:
How do I scroll two textareas in sync with FireFox/Mozilla? The IE solution has been posted before by Martin Honnen.
2
11237
by: Mark Szlazak | last post by:
The following code fails in Firefox to get at selected text in the right-side textarea. Any help would be appreciated. <html> <head> <script> var agt = navigator.userAgent.toLowerCase(); var safari = ((agt.indexOf('safari') != -1) && (agt.indexOf('mac') != -1))? true:false; var opera = (window.opera)? true:false;
1
3414
by: Mark Szlazak | last post by:
Is there a way to detect if an textarea onscroll event is working in Firefox (or Mozilla). I know that there is an onscroll event bubbling bug with current vesions of these browsers so I want to detect this problem with a test like "if (textarea.onscroll == 'undefined' || !textarea.onscroll) {}." Any help would be appreciated.
5
20651
by: Simon Wigzell | last post by:
Looks like firefox doesn't support onscroll. Any workaround?
5
20290
by: sam | last post by:
Hi all, I am using documnet.body.scroll to disable the window scroll bar. This works in IE only and not other browsers. Can any one tell me if there is any such method which is cross browser compatible. Thanks, sam
1
2511
by: Jeremy | last post by:
Is there any way to get Mozilla to fire an event when a textarea scrolls? IE seems not to have a problem with it, but Moz just won't cooperate. I tried the W3 event model: myTextArea.addEventListener("scroll", fn, true); - also tried "false" for the phase parameter (apparently this event neither bubbles nor captures). I also tried the "singleton" event model: myTextArea.onscroll = fn;
0
2146
by: Jocker | last post by:
Hi Group I'm writing an Internet Explorer plugin. Everything works well, except when I try to handle the onscroll event. http://msdn.microsoft.com/workshop/browser/mshtml/reference/ifaces/window2/onscroll.asp http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onscroll.asp another possibility seems to exist with IHTMLElement2.onscroll using the document body, but this does not solve the problem. the following code snippet...
6
8819
by: dotcom | last post by:
Hello friends, i have written following line of code in javascript for event handler but it works fine with IE but not works with Firefox it get stuck on "attachevent" addScrollSynchronization(divHeaderColumn, divContent, "vertical"); function addScrollSynchronization(fromElement, toElement, direction) { removeScrollSynchronization(fromElement); fromElement._syncScroll = getOnScrollFunction(fromElement);
0
9726
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10395
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10130
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9204
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6887
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5553
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4338
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.