SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: onmouse over

  1. #1
    SitePoint Member
    Join Date
    Sep 2002
    Location
    New Zealand
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    onmouse over

    Hi,

    I got a picture. Anywhere you mousover it display hidden div in a absolute position. It works fine. However, when you mouse over on the div itself it flicker..because it conflict with mouse over picture area.

    Any suggestion what i can do. I tried adding hide on div rollover.. no luck

    Regards

    Code:
     //html code
      
      <div style="float:left; width:342px; margin:0 -30px 0 0;"> 
      <img src="images/davem-q.png" id="davem-q"   style="position:absolute; margin-top:140px; margin-left:15px;border:0; visibility:hidden"/> 
      <a href="#" onmouseover="show('davem-q');" onmouseout="hide('davem-q');" > 
      <img src="images/davem.jpg"   alt="Dave Murray" border="0" /></a>
      </div>
      
      
      //javascript code
      
      function show(id){
          
          getElement(id).style.visibility='visible';
          
      }
      
      
      function hide(id){
          getElement(id).style.visibility='hidden';
      
    }

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,527
    Mentioned
    84 Post(s)
    Tagged
    4 Thread(s)
    Copying the onmouseover event to the displayed image gets it going.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Sep 2002
    Location
    New Zealand
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for the reply specially for the hints. I i've added onmouseover event in the displayed image it didn't makes any difference. However, i've added onmousemove event and onmouseout event in the popup image it doesn't flicker anymore and popup div doesn't overlap anymore.

    Thanks for your help.


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
  •