473,670 Members | 2,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

function is firing with every move of the mouse in the onmouseOver area

6 New Member
First off, I've pretty much convinced myself that the issue is that there are onmouseover events inside the div that contains an onmouseover event on it... I wrote the message below first. This was added as I sent.

Original:

My function is firing with every move of the mouse in the onmouseOver area.

I've assigned the onmouseOver event to a div tag. The function will expand the div downwards, over the other content on the page.

When I move the mouse into the mouseover area and stop moving it completely, the functions starts the animation no problem, but if I move the mouse even a pixil, the event fires all over again.

Some specifics:
- there is a nested div
- what I think may be the "gotcha", there is a set of rollover images for a nav within that nested div, that are display: none until the mouseover event fires the animation.
- the onmouseover event calls a function that initializes two functions for me, one changes some CSS values, the other fires the animation.

I am using the slider script from firblitz.com.

I've tried several different methods, and also wrote my own script, nothing would make that behavior go away. It's the same in FF and IE6.

Is there some way that I can truly detect if the mouse has moved away from the containing div?

Thanks,

Andy
Mar 14 '07 #1
5 3134
Sabbaath
6 New Member
Here's a thought, maybe I could pass a boolean to the function from the nested onmouseover, so if the main function knows that startAnim is false, quit, if it's true, start the animation.

That may only confuse the browser more as well though... It will then be getting start and stop commands continuously...

Hey, I could check it on the main function, if the nested div's display is set to block, then don't run, if it's none, run. That's too simple, that's why I didn't think of it before... :)

Anyway, I'm new here and look forward to jumping in.

- Andy


First off, I've pretty much convinced myself that the issue is that there are onmouseover events inside the div that contains an onmouseover event on it... I wrote the message below first. This was added as I sent.

Original:

My function is firing with every move of the mouse in the onmouseOver area.

I've assigned the onmouseOver event to a div tag. The function will expand the div downwards, over the other content on the page.

When I move the mouse into the mouseover area and stop moving it completely, the functions starts the animation no problem, but if I move the mouse even a pixil, the event fires all over again.

Some specifics:
- there is a nested div
- what I think may be the "gotcha", there is a set of rollover images for a nav within that nested div, that are display: none until the mouseover event fires the animation.
- the onmouseover event calls a function that initializes two functions for me, one changes some CSS values, the other fires the animation.

I am using the slider script from firblitz.com.

I've tried several different methods, and also wrote my own script, nothing would make that behavior go away. It's the same in FF and IE6.

Is there some way that I can truly detect if the mouse has moved away from the containing div?

Thanks,

Andy
Mar 14 '07 #2
acoder
16,027 Recognized Expert Moderator MVP
Welcome to TSDN.

In the W3C model, you call e.stopPropagati on() and in the Microsoft model, window.event.ca ncelBubble=true . See event order link. It might be useful to read the tutorial from the beginning.
Mar 14 '07 #3
Sabbaath
6 New Member
Welcome to TSDN.

In the W3C model, you call e.stopPropagati on() and in the Microsoft model, window.event.ca ncelBubble=true . See event order link. It might be useful to read the tutorial from the beginning.

Thanks! You totally rock.

- Andy
Mar 14 '07 #4
acoder
16,027 Recognized Expert Moderator MVP
No problem. You're welcome...
Mar 15 '07 #5
Sabbaath
6 New Member
No problem. You're welcome...

I feel reeeaaally stupid... I don't have to worry about this at all. I can get rid of the nested rollovers by using a.hover and using a background-image: on it...

Doh! (smacks forehead)

- Andy
"Master of Missing the Obvious"
Mar 15 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
5392
by: Marty Morris | last post by:
I used the following script to allow me to bring up a list of events for a given year by simply hovering the mouse over the filename. As follows -- <script Language="JavaScript"> function winopen1(){ msg1=open ("","WINDOW1","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=550,height=200"); msg1.location="1989H.htm"} </Script>
2
9158
by: Kevin Lyons | last post by:
Hello, Can anyone assist me with what I am trying to do with the following code (six different scenarios to try to make the functionality work correctly)? I want to always (and ONLY) display in the status bar 'Symantec Corporation' whenever anyone mouses over (onMouseOver) my image or link OR when one clicks while holding the left mouse down (onClick) on the same image or link. Upon releasing the mouse (onMouseOut), the
1
5035
by: teb | last post by:
Hello all, Here is basically the situation. I have an empty div on my page. When I mouseover a word, the innerHTML of the div gets written with a table. The td elements all have onclick, onmouseover, etc. events. When I mouseover a word, the div appears, but none of the events fire until another event occurs. For example, if I put in an alert box or I right click, and then mouseover the div, the td events then work. Keep in mind that...
7
2423
by: fernandoronci | last post by:
Hi, I've been given the task of mantaining and fixing a website which I didn't design. I'm using Internet Explorer 5.5 and 6.x. Specifically, the problem is that navigation menues (written in javascript) don't disappear when the mouse moves outside of the area of the menues (some of the menues are nested two and three levels). As long as the mouse cursor remains *within* the options of the menues, the option under the mouse cursor is...
1
1506
by: Brent | last post by:
I wrote a "show div"* function that fires (and sets a DIV's "display" style to '') when the user mouses over a certain area on the screen. I also have a "fade div"** function that fires when the user moves the mouse away from that area. This all works quite nicely. But I'd like to add one more behavior...I'd like the div fade to stop if the user happens to mouse over the popup div, and stay stopped so long as the user remains within the...
2
3348
by: Justin Rowe | last post by:
I'm attempting to design a site with alot of dynamic content and intractability, however I've hit a snag when it comes to the function of the onMouseOver and onMouseOut events. Using a bit of code from QuirksMode to grab the location of the mouse, I've built a tooltip function to show a tooltip to the user depicting the target of a link, the problem is when you mouse over the box that the tooltip function is attatched to the tooltip...
8
1276
by: RC | last post by:
The Subject says its all. document.getElementById('id'); only return an object with id name. I am looking for a function return array of objects. document.getAllElementIds();
5
1532
by: john_woo | last post by:
Hi, If what I want from the on_mouse_move function is, trigger another function in two case: 1. when the mouse holds at same position for 1 second; 2. when the mouse fully stop; in other cases (when mouse keeps moving) don't trigger that function. Can any one tell how to implement this?
5
3391
by: vidishasharma | last post by:
Hi, I have a windows from with few controls over it. Now I have to see if the cursor goes outside the bounds of the windows form then I have to close the form. I added mouse leave for the form however as soon as the cursor goes on any control over the form form_ MouseLeave is fired. I want to this to be fired only if it goes outside the bounds of the
0
8466
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
8384
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,...
0
8813
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8659
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
5683
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
4208
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...
0
4388
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2037
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1791
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.