DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2008
    Posts
    1

    Thumbs down hover with mouse over

    ok I am trying to make one of those image hovers like netflix has I got the hover with mouseOver to work but unfortuantly I can not get the onMouseOut to work so that the image that pops up disapears.

    This code works:
    <p><a onMouseOver ="document.getElementById('txtHint').innerHTML='<div id=popup ><div align=center>'";/><img src="routebtn.jpg"></p>


    But this is what I need to work:
    <p><a onMouseOver ="document.getElementById('txtHint').innerHTML='<div id=popup ><div align=center>'";onMouseOut ="document.getElementById('txtHint').innerHTML=''"; /><img src="http://www.bullrun.com/images/routebtn.jpg"></p>

  2. #2
    Join Date
    Jan 2005
    Posts
    413
    it's kind of a protracted approach. The way to do this is to hard code your pop-up div into your page, and just hide/show with JavaScript. Set the div whose ID is pop up to display: none; in your CSS, then on mouse over of the image you put this code:

    document.getElementById('txtHint').style.display ='block'

    And then on mouse out put:
    document.getElementById('txtHint').style.display ='none'

  3. #3
    Join Date
    May 2008
    Posts
    4

    Onmouseout

    I read your post and had come across a similar issue earlyer this week. You are going to want to look http://www.quirksmode.org/ They have a good walk through on making on mouse out functions. You are going to need to write or use the script they have there so that the mouse out function is not triggered when your mouse moves from the div to the image itself. If you read through this article (http://www.quirksmode.org/js/events_mouse.html) you should get a better idea of what im talking about and how to solve your problem.

  4. #4
    Join Date
    Jan 2005
    Posts
    413
    he wants the div to appear on mouse over of the image. And to the original author, the mouse out function isn't working because of this;

    align=center>'";onMouseOut

    Remove ;, and mouse out should function

Similar Threads

  1. how to get rowid on datagrid mouse hover event
    By trnmurthy1972 in forum .NET
    Replies: 0
    Last Post: 06-19-2007, 01:00 AM
  2. Tool Bar popups on mouse hover
    By will808 in forum Java
    Replies: 2
    Last Post: 08-29-2005, 02:32 PM
  3. Capturing Mouse Movements outside of screen resolution
    By Chris Eastwood in forum VB Classic
    Replies: 4
    Last Post: 03-28-2002, 01:26 PM
  4. Mouse Movement Playback
    By Eugene in forum VB Classic
    Replies: 4
    Last Post: 12-19-2000, 12:52 PM
  5. Mouse Movement Playback
    By Eugene in forum VB Classic
    Replies: 0
    Last Post: 12-19-2000, 11:13 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links