PHP ver gevorderde |
|
Het gaat over : http://www.profielweb.nl/game123/
Het probleem :
In FF, geeft hij de screenshot helemaal boven.
In IE, geeft hij de screenshot op de juiste plek.
Hoe word hij netzoals IE in FF?
Me script :
In de head :
<style type="text/css">
<!--
#dek {
POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;
} body {
background-color: #000000;
}
-->
</style>
<style type="text/css"> <!-- #dek { POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200; } body { background-color: #000000; } --> </style>
In de body :
<DIV ID="dek"></DIV>
<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.dek
else if (ns6)
skn=document.getElementById("dek").style
else if (ie4)
skn=document.all.dek.style
if(ns4)document.captureEvents(Event.MOUSEMOVE);
else{
skn.visibility="visible"
skn.display="none"
}
document.onmousemove=get_mouse;
function popup(msg,bak){
var content="<TABLE WIDTH=100 BORDER=1 BORDERCOLOR=black CELLPADDING=2 CELLSPACING=0 "+
"BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=black SIZE=2>"+msg+"</FONT></TD></TABLE>";
yyy=Yoffset;
if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
if(ns6){document.getElementById("dek").innerHTML=content;skn.display=''}
if(ie4){document.all("dek").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 kill(){
yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ns6||ie4)
skn.display="none"
}
//-->
</SCRIPT>
<DIV ID="dek"></DIV> <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.dek else if (ns6) skn=document.getElementById("dek").style else if (ie4) skn=document.all.dek.style if(ns4)document.captureEvents(Event.MOUSEMOVE); else{ skn.visibility="visible" skn.display="none" } document.onmousemove=get_mouse; function popup(msg,bak){ var content="<TABLE WIDTH=100 BORDER=1 BORDERCOLOR=black CELLPADDING=2 CELLSPACING=0 "+ "BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=black SIZE=2>"+msg+"</FONT></TD></TABLE>"; yyy=Yoffset; if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"} if(ns6){document.getElementById("dek").innerHTML=content;skn.display=''} if(ie4){document.all("dek").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 kill(){ yyy=-1000; if(ns4){skn.visibility="hidden";} else if (ns6||ie4) skn.display="none" } //--> </SCRIPT>
Weergeven doe ik met :
echo "<a href='game.php?id=". $obj['id'] ."' ONMOUSEOVER=\"popup(' <img src=screenshot/". $obj['screenshot']."> ','lightgreen')\" ONMOUSEOUT=\"kill()\">". $obj['titel'] ."</a><br>";
echo "<a href='game.php?id=". $obj['id'] ."' ONMOUSEOVER=\"popup(' <img src=screenshot/". $obj['screenshot']."> ','lightgreen')\" ONMOUSEOUT=\"kill()\">". $obj['titel'] ."</a><br>";
Wie weet me oplossing???
|