Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2007
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    disappear tooltip on mouseout event

    Can anybody tell me how to disappear the popup on mouseout event.I tried but failed.It will show a tooltip/popup on mouseover event but is not going away on mouseout event.
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <SCRIPT TYPE="text/javascript">
    <!--
    Xoffset=-60;    // modify these values to ...
    Yoffset= 20;    // change the popup position.
    
    var old,skn,iex=(document.all),yyy=-1000;
    
    var ns4=document.layers
    var ns6=document.getElementById&&!document.all
    var ie4=document.all
    
    if (ns4)
       skn=document.infobox
    else if (ns6)
       skn=document.getElementById("infobox").style
    else if (ie4)
       skn=document.all.infobox.style
    if(ns4)document.captureEvents(Event.MOUSEMOVE);
    else{
       skn.visibility="visible"
       skn.display="none"
    }
    document.onmousemove=get_mouse;
    
    function msgbox(msg,bak) {
       var content="<table width=300 border=1 bordorcolor=black cellpadding=2 cellspacing=0 "+
       "bgcolor="+bak+"><tr align=left><td width=100%><font color=#404040 size=2><b><i>Pack Download Command</i></b></font><br><font color=#404040 size=1>Copy the following text into your clipboard and<br>once in the channel hit CTRL+V to paste it!</font></td></tr><tr align=left><td width=100%><font color=black size=2>"+msg+"</font></td></tr></table>";
       yyy=Yoffset;
        if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
        if(ns6){document.getElementById("infobox").innerHTML=content;skn.display=''}
        if(ie4){document.all("infobox").innerHTML=content;skn.display=''}
    }
    
    function get_mouse(e){
       var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
       skn.left=x+Xoffset;
       var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
       skn.top=y+yyy;
    }
    
    function die(){
       yyy=-1000;
       if(ns4){skn.visibility="hidden";}
       else if (ns6||ie4)
       skn.display="none"
    }
    
    //-->
    </SCRIPT>
    </head>
    
    <body>
    <DIV id="infobox">MOUSE HERE</DIV>
    <a href="http://some_link.htm" onmouseover="msgbox('Message Text Here','#E6E6BE')"; onmouseout="die()">Link Text</a>
    
    </body>
    </html>

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,155
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    Do you *REALLY* care about NS 4 and MSIE 4 browsers????

  • #3
    New Coder
    Join Date
    Oct 2007
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    Do you *REALLY* care about NS 4 and MSIE 4 browsers????
    Actually I got it from somewhere else.i just want to make it work.Could u just correct the code?

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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