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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help onMouseout

    Code:
    <script type="text/javascript">
    <!--
    var gid = 0;
    var rx  = 0;
    var ry  = 0;
    var mv  = 0;
    var v   = false;
    var tid = 0;
    
    function itemmouseover(id,st){
        var stt  = st.split(","); 
        var html = document.documentElement;
        var body = document.body;    
        var scrollLeft = (body.scrollLeft || html.scrollLeft);
        var scrollTop  = (body.scrollTop || html.scrollTop);
        var link = "";
        tid = id;
        if(!(mv > 3) || v){
            for(var i=0;i<(stt.length/3);++i){
                link += '<a target="" href="' + stt[(i*3)] + '.html?' + stt[(i*3)+1] + '" style="text-decoration:none;">' + stt[(i*3)+2] + '</a>'
                link += "<br>";
            }
            li.innerHTML = link;
            li.style.left = document.getElementById(id).getBoundingClientRect().left + scrollLeft + 240;
            li.style.top = document.getElementById(id).getBoundingClientRect().top + scrollTop + 4;
            document.getElementById(gid).style.backgroundColor = "transparent";
            document.getElementById(id).style.backgroundColor = "#000000";
            gid = id;
        }else{
            setTimeout(function(){remouseover(id,st);},600);
        }
    }
    
    function remouseover(id,st){
        var stt  = st.split(","); 
        var html = document.documentElement;
        var body = document.body;    
        var scrollLeft = (body.scrollLeft || html.scrollLeft);
        var scrollTop  = (body.scrollTop || html.scrollTop);
        var link = "";
        if(rx < (document.getElementById(id).getBoundingClientRect().left + scrollLeft + 180) && tid == id){
            for(var i=0;i<(stt.length/3);++i){
                link += '<a target="" href="' + stt[(i*3)] + '.html?' + stt[(i*3)+1] + '" style="text-decoration:none;">' + stt[(i*3)+2] + '</a>'
                link += "<br>";
            }
            li.innerHTML = link;
            li.style.left = document.getElementById(id).getBoundingClientRect().left + scrollLeft + 240;
            li.style.top = document.getElementById(id).getBoundingClientRect().top + scrollTop + 4;
            gid = id;
        }
    }
    
    function itemclick(id,st){
        var stt  = st.split(","); 
        var html = document.documentElement;
        var body = document.body;    
        var scrollLeft = (body.scrollLeft || html.scrollLeft);
        var scrollTop  = (body.scrollTop || html.scrollTop);
        var link = "";
        for(var i=0;i<(stt.length/3);++i){
            link += '<a target="" href="' + stt[(i*3)] + '.html?' + stt[(i*3)+1] + '" style="text-decoration:none;">' + stt[(i*3)+2] + '</a>'
            link += "<br>";
        }
        li.innerHTML = link;
        li.style.left = document.getElementById(id).getBoundingClientRect().left + scrollLeft + 240;
        li.style.top = document.getElementById(id).getBoundingClientRect().top + scrollTop + 4;
        gid = id;
    }
    
    function myresize(){
        var html = document.documentElement;
        var body = document.body;    
        var scrollLeft = (body.scrollLeft || html.scrollLeft);
        var scrollTop  = (body.scrollTop || html.scrollTop);
        li.style.left = document.getElementById(gid).getBoundingClientRect().left + scrollLeft + 240;
        li.style.top  = document.getElementById(gid).getBoundingClientRect().top + scrollTop + 4;
    }
    
    function mymove(e){
        if(!e){
            e = window.event;
        }
        var mx = e.clientX - rx;
        var my = e.clientY - ry;
        mv = Math.sqrt((mx * mx) + (my * my))
        
        var html = document.documentElement;
        var body = document.body;    
        var scrollLeft = (body.scrollLeft || html.scrollLeft);
        var scrollTop  = (body.scrollTop || html.scrollTop);
        var le = document.getElementById(gid).getBoundingClientRect().left + scrollLeft;
        if(((Math.abs(mx) - Math.abs(my)) < -3) || (mx < 0 || rx < le)){
            v = true;
        }else{
            v = false;
        }
        rx = e.clientX;
        ry = e.clientY;
    }
    //-->
    </script>
    Hello, need clear the onMouseover function, need help, thanks in advance.

    Site: http://gw2events.cwahi.net/ffxivmap/

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,524
    Thanks
    3
    Thanked 508 Times in 495 Posts
    Code:
    <html>
    <head>
    <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
    <meta http-equiv="content-language" content="en">
    <meta name="keywords" content="FF14,FFXIV,XIV,gather,map,A Realm Reborn,ARR">
    <meta name="description" content="It is a gathering map of Final Fantasy XIV: A Realm Reborn. Clicking the icon or map the point, You can view the list and items and level.">
    <title>FFXIV : A Realm Reborn Gathering Map</title>
    <link rel="stylesheet" href="http://gw2events.cwahi.net/common.css" type="text/css" />
    <script type="text/javascript">
    <!--
    
    function Init(t,delay){
     var t=document.getElementById(t),li=document.getElementById('li');
     if (t&&li){
      var rows=t.rows,cell,a,s,z0=0,z0a;
      for (;z0<rows.length;z0++){
       cell=rows[z0].cells[0];
       a=rows[z0].getElementsByTagName('A')[0];
       if (a&&a.rel&&cell){
        a=a.rel.split(',');
        s='';
        for (z0a=0;z0a<(a.length/3);z0a++){
         s+='<a target="" href="'+a[z0a*3]+'.html?'+a[z0a*3+1]+'" style="text-decoration:none;">'+a[z0a*3+2]+'</a>'
         s += "<br>";
        }
       }
       cell.html=s;
       cell.onmouseover=function(){ over(this,s);  }
       cell.onmouseout=function(){ out();  }
      }
      li.onmouseover=function(){ clear();  }
      li.onmouseout=function(){ out();  }
      over.delay=typeof(delay)=='number'&&delay>50?delay:1000;
     }
    }
    
    function over(td){
     clear();
     if (over.lst&&over.lst!=td){
      over.lst.style.backgroundColor='transparent';
     }
     td.style.backgroundColor='red';
     var li=document.getElementById('li'),p=pos(td);
     li.innerHTML=td.html;
     li.style.left=p[0]+'px';
     li.style.top=p[1]+'px';
     over.lst=td;
    }
    
    function out(){
     if (over.lst){
      over.to=setTimeout(function(){
       over.lst.style.backgroundColor='transparent';
       document.getElementById('li').style.top='-3000px';
      },over.delay);
     }
    }
    
    function clear(){
     clearTimeout(over.to);
    }
    
    function pos(obj){
      var rtn=[0,0];
      while(obj){
       rtn[0]+=obj.offsetLeft;
       rtn[1]+=obj.offsetTop;
       obj=obj.offsetParent;
      }
      return rtn;
     }
    
    //-->
    </script>
    
    <style type='text/css'>
    .cwlb { text-align: right; position: absolute; top: 0; left: 0px; width: 100%; margin: 0; padding: 0; z-index:2147483647; }
    .cwlb ul { color: black; margin: 0; padding: 0; list-style-type: none; overflow: hidden; background-color: #cccccc; vertical-align: middle; border-bottom: 1px solid black; height: 19px; line-height: 18px; }
    .cwlb li { display: inline; }
    .cwlb a { padding: 0 5px; font-family: tahoma,verdana; font-size: 11px; text-decoration: none; color:#0000cc; }
    #footerad { background-color: #cccccc !important; }
    #footerad span { line-height: 18px !important; }
    #footerad a { line-height: 18px !important; font-size: 10px !important; }
    </style>
    </head>
    <body bgcolor="#eeeedd" onload="Init('table',500)">
    <!-- Start of CWahi Link Bar -->
    
    <table id="table" align="center" border="1">
        <tr>
            <td width="200" class="loc" >
                <a rel="10,5,Eastern Thanalan" ></a>Ala Mhigan Mustard
            </td>
            <td width="180"><img src="http://gw2events.cwahi.net/ffxivmap/img/migi.gif">        </td>
        </tr>
        <tr>
            <td width="200" class="loc" id="1" >
                <a rel="1,3,Central Shroud" ></a>Allagan Snail
            </td>
            <td width="180"><img src="http://gw2events.cwahi.net/ffxivmap/img/migi.gif">        </td>
        </tr>
        <tr>
            <td width="200" class="loc" id="2" >
                <a rel="3,5,South Shroud,3,5,South Shroud" ></a>Alligator Pear
            </td>
            <td width="180"><img src="http://gw2events.cwahi.net/ffxivmap/img/migi.gif">        </td>
        </tr>
    </table>
    <div id="li" style="position:absolute;left:-3000px;top:-3000px;margin-left:240px;margin-top:4px;">66</div>
    
    </body>
    </html>
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/


  •  

    Posting Permissions

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