Results 1 to 5 of 5

Thread: onMouseout !!

  1. #1

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    onMouseout !!

    Hi there,
    The problem is that I can not get the image hidden when I use "onMouseout "event...!!
    All I want is that I want imege to be seen when "onmouseover" the link and be hidden when onMouseout
    could you please help
    thanks in advance..
    -------------------------------------------

    <body>
    <script>
    function show()
    {
    document.getElementById("res").innerHTML="<img src=sabit14.jpg width=100 height=130 style=visibility:visible;>";
    }

    function clear()
    {
    document.getElementById("res").innerHTML="";
    }
    </script>
    get your mouse<a href ="#" id=res onMouseover="show()";onMouseout="clear()"> here</a> to see my image..<br>
    </body>

  2. #2
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602

    Re: onMouseout !!

    <a href ="#" id=res onMouseover="show()";onMouseout="clear()"

    Try taking out the semicolon between the events.
    Place a semicolon after each function call but within the " ".

    <a href ="#" id=res onMouseover="show();" onMouseout="clear();"
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

  3. #3

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    Re: onMouseout !!

    Hi,
    Thanks..it works but..What I really mean is that I want my image to be hidden(disappear) again when I move my mouse back..but the image is still there...
    onMouseover="oh ı can see it!!"
    onMouseout="and now it's gone"...thats it..

    could you please help me more...
    thanks

  4. #4
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602

    Re: onMouseout !!

    HTML Code:
    <html>
    <head>
    <title>Image Rollover</title>
    
    <script type = "text/javascript">
    
    function showImage(){
    con.style.display = 'none';
    picDiv.style.display = '';
    }
    
    function showText(){
    con.style.display = '';
    picDiv.style.display = 'none';
    }
    
    </script>
    
    </head>
    
    <body>
    <div id = "picDiv" style = "display:none; width:100px;" onmouseout = "showText();">
    <img src = "sabit.jpg" id = "pic" width = "100px" height = "130px" />
    </div>
    
    <div id = "con" onmouseover = "showImage();">
    Mouseover here to see image
    </div>
    
    </body>
    </html>
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

  5. #5
    Addicted Member BIOSTALL's Avatar
    Join Date
    Apr 2005
    Location
    Northampton, UK
    Posts
    180

    Re: onMouseout !!

    Merhaba, i usually try to stay clear of words such as 'Show' and 'Clear' when naming subs or variables because there is a chance these are stored words

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width