SunQuest
           Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old October 18th, 2003, 01:34 AM
quantumpuppet quantumpuppet is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: NY
Posts: 40 quantumpuppet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to quantumpuppet
OnMouseOver & onMouseOut

I am using the onMouseOver and onMouseOut event handler to cause a picture to become visible when the mouse is over the target area, and then hidden when the mouse moves off the target area. It works perfectly EXCEPT when I move the mouse over the target area incredibly fast. At this high mouse movement speed sometimes the onMouseOut event is not triggered, and the picture stays visible when it should be hidden. I dropped a larger layer behind the target area with a duplicate onMouseOut event handler, and it helps, but I can still cause it to misbehave by moving the mouse REALLY INCREDIBLY fast. Anyone have any suggestions besides "Just don't move the mouse that fast!". I am going to code up some Javascript to force the image to a hidden state after a certain time interval has elapsed, but that may generate its own problems.

Reply With Quote
  #2  
Old October 18th, 2003, 05:26 AM
CodeKadiya CodeKadiya is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,313 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to CodeKadiya
RE: OnMouseOver & onMouseOut

Is this the way you code your script??? However, this worked fine.. I couldn't move my mouse away from the target area without hiding the image... I tried it faster than the fastest athlete! :laugh:

Code:
<html>
<head>
<title>Mouse Over/Out</title>
<script language="JavaScript">
function imgMouse(mouse)
{
	var imgName='home.gif';
		
	if(mouse=="down")
		pic.innerHTML = "<img src='"+ imgName +"'>";
	else
		pic.innerHTML = "";
}
</script>
</head>
<body>
<div id="pic" style="position:absolute; width:88px; height:52px; z-index:5; background-color: #CCCCCC; layer-background-color: #CCCCCC; border: 1px none #000000;" onMouseOver="imgMouse('down')" onMouseMove="imgMouse('down')" onMouseOut="imgMouse('up')"> 
</div>
</body>
</html>

Reply With Quote
  #3  
Old October 18th, 2003, 04:42 PM
quantumpuppet quantumpuppet is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: NY
Posts: 40 quantumpuppet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to quantumpuppet
RE: OnMouseOver & onMouseOut

Many thanks your refreshingly simple example got me back on the right track. I was up to late last night making my code way to complicated by using excessive layering. I had to many layers hiding and showing each other, I deleted it all and now have only one layer that does what I needed...with one js function that calls some layer style options during the onMouseOver event handler.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > OnMouseOver & onMouseOut


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway