View Single Post
Sponsorlu Bağlantılar
Zoque.Forum
Advertisement
Old 29.04.2003   #8 (permalink)
soul
 
soul's Avatar
 
Üyelik Tarihi: 13.07.2000
Yer: LND
Mesaj: 4,251
iltifatlara layık olmaya çalışıyoruz

@flexin güzel soru
Hocam aslında şu var asdfclub taki elle kordinat verilmiş bir hali bunun. Ancak bu scripte küçük bir modifikasyon ile istediğini yapabiliriz.

Nitekim yaptım da buyrun yeni js kodu; {Static.VR}


Statik Versiyonu
Mouse üzerine geldiğinde ilk çıktığı yerde kalır.

PHP Code:
//*********************************//
// SoulTip v0.8 + Static.VR
//*********************************//
// by Ferruh Mavituna
// [email]ferruh@mavituna.com[/email]
// Non-Commercial use Only
//*********************************//
// 25.04.2003
// IE5+ Only
//*********************************//
// sample : <a href="test.htm" help="Go to test page">Look at me !</a>
// For more info [url]http://ferruh.mavituna.com/[/url]

//* Customizations;
var divname="soultip";
var 
divInnername="soultipinner";

//* Fix SoulTip Coordinates
var CoordLeft=10;
var 
CoordRight=-15;

function 
fm_findObj(nd) { //v4.01 MM Find Obj. by Macromedia 
  
var p,i,x;  if(!dd=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    
d=parent.frames[n.substring(p+1)].documentn=n.substring(0,p);}
  if(!(
x=d[n])&&d.allx=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(
i=0;!x&&d.layers&&i<d.layers.length;i++) x=fm_findObj(n,d.layers[i].document);
  if(!
&& d.getElementByIdx=d.getElementById(n); return x;
}
function 
fm_MXY(XorY){ // Mouse Coords
    
var coord 0;
    
XorY=="x"?coord event.clientX document.body.scrollLeft:coord event.clientY document.body.scrollTop;
    if(
coord<0)coord=0;
    return 
coord;
}
function 
fm_help(){ // Show-Hide 
    
var thisObj fm_findObj(divname);
    
    var 
desc window.event.srcElement.help;
    if(
desc!=null){
        
fm_writehelp(desc)
        if(
document.alldesc!=desc){
            var 
fm_MXY("x"), fm_MXY("y");
            
thisObj.style.left=x+CoordLeft+"px";
            
thisObj.style.top=y+CoordRight+"px";
        }
        
        
document.alldesc=desc;
    }else{
        
thisObj.style.display="none";
    }
}
function 
fm_writehelp(val){ // Write Tip
    
var thisObj fm_findObj(divname);
    var 
innerObj fm_findObj(divInnername);
    
innerObj.innerHTML=val;
    
thisObj.style.display="block";
}

// Grab mousemove
document.onmousemove=fm_help
Eski jsni (soultip.js) bununla değiştirirsen istediğin şekilde çalışacaktır.

değişen yer;
PHP Code:
function fm_help(){ // Show-Hide 
    
var thisObj fm_findObj(divname);
    
    var 
desc window.event.srcElement.help;
    if(
desc!=null){
        
fm_writehelp(desc)
        if(
document.alldesc!=desc){
            var 
fm_MXY("x"), fm_MXY("y");
            
thisObj.style.left=x+CoordLeft+"px";
            
thisObj.style.top=y+CoordRight+"px";
        }
        
        
document.alldesc=desc;
    }else{
        
thisObj.style.display="none";
    }

__________________
FERRUH.MAVİTUNA - Okuduklarim
3-5-7 zotoro ucgeni
soul şu an çevrimdışı   Mesajdan alıntı yaparak yeni bir cevap ekleyin