Os elementos abaixo funcionam no Firefox e não funcionam no I.E, mesmo eu tendo testado com todos os "DOCTYPE" relacionados abaixo.
Alguém sabe porque?
Firefox v3.5.5
Internet Explorer v8.6001.18702
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Frameset//EN” “http://www.w3.org/TR/html4/frameset.dtd”>
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Frameset//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd”>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<!---- pop-up - head - inicio ------>
<script language="javascript" type="text/javascript">
function Mens (texto) {
var html = "<div class=\'tiphold b1tt\'>";
html += " <div class=\'w100p b2tt\'>";
html += " <table class=\'w100p\'>";
html += " <tr>";
html += " <td class=\'c2tt\'>";
html += " <font face='Tahoma' color='#FFFFFF' size='3'>";
html += texto;
html += " </font>";
html += " </td>";
html += " </tr>";
html += " </table>";
ddrivetip (html);
}
</script>
<style fprolloverstyle="">
.b1tt {background:#FF9623;}
.b2tt {background:#670400;}
.c2tt {color:#FFFFFF;}
.w100p {width:100%;}
#dhtmltooltip {position:absolute;visibility:hidden; z-index:100;}
.tiphold, .tiphold2 {width:230px;padding:1px;}
.tiphold .b2tt, .tiphold2 .b2tt {padding:10px 0px;}
.tiphold .c2tt {font-size:10px;}
.tiphold td {vertical-align:top;}
.tiphold table {clear:both;}
.tiphold table td {padding-left:28px;}
</style>
<!---- pop-up - head - fim ------>
<li><a href="#" onmouseover="Mens ('Ainda não está pronto!');" onmouseout="hideddrivetip()">Duis blandit consequat velit, vitae elementum nunc mollis nec. In a nulla </a></li>
<!---- pop-up - body - inicio ------>
<div style="left: -1000px; top: 336px; visibility: hidden;" id="dhtmltooltip">
x
</div>
<script language="javascript" type="text/javascript">
var offsetxpoint=-60 //Customize x offset of tooltip
var offsetypoint=20 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
function ddrivetip(thetext, thecolor, thewidth){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}
function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20
var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000
if (rightedge<tipobj.offsetWidth)
tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
else if (curX<leftedge)
tipobj.style.left="5px"
else
tipobj.style.left=curX+offsetxpoint+"px"
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"
}
}
function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=""
tipobj.style.width=""
}
}
document.onmousemove=positiontip
</script>
<!---- pop-up - body - fim ------>
Pergunta
Rhaone
onMouseOver em Firefox e I.E.
Os elementos abaixo funcionam no Firefox e não funcionam no I.E, mesmo eu tendo testado com todos os "DOCTYPE" relacionados abaixo.
Alguém sabe porque?
Firefox v3.5.5
Internet Explorer v8.6001.18702
<!---- pop-up - head - inicio ------> <script language="javascript" type="text/javascript"> function Mens (texto) { var html = "<div class=\'tiphold b1tt\'>"; html += " <div class=\'w100p b2tt\'>"; html += " <table class=\'w100p\'>"; html += " <tr>"; html += " <td class=\'c2tt\'>"; html += " <font face='Tahoma' color='#FFFFFF' size='3'>"; html += texto; html += " </font>"; html += " </td>"; html += " </tr>"; html += " </table>"; ddrivetip (html); } </script> <style fprolloverstyle=""> .b1tt {background:#FF9623;} .b2tt {background:#670400;} .c2tt {color:#FFFFFF;} .w100p {width:100%;} #dhtmltooltip {position:absolute;visibility:hidden; z-index:100;} .tiphold, .tiphold2 {width:230px;padding:1px;} .tiphold .b2tt, .tiphold2 .b2tt {padding:10px 0px;} .tiphold .c2tt {font-size:10px;} .tiphold td {vertical-align:top;} .tiphold table {clear:both;} .tiphold table td {padding-left:28px;} </style> <!---- pop-up - head - fim ------><li><a href="#" onmouseover="Mens ('Ainda não está pronto!');" onmouseout="hideddrivetip()">Duis blandit consequat velit, vitae elementum nunc mollis nec. In a nulla </a></li><!---- pop-up - body - inicio ------> <div style="left: -1000px; top: 336px; visibility: hidden;" id="dhtmltooltip"> x </div> <script language="javascript" type="text/javascript"> var offsetxpoint=-60 //Customize x offset of tooltip var offsetypoint=20 //Customize y offset of tooltip var ie=document.all var ns6=document.getElementById && !document.all var enabletip=false if (ie||ns6) var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : "" function ddrivetip(thetext, thecolor, thewidth){ if (ns6||ie){ if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px" if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor tipobj.innerHTML=thetext enabletip=true return false } } function positiontip(e){ if (enabletip){ var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft; var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop; //Find out how close the mouse is to the corner of the window var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20 var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20 var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000 if (rightedge<tipobj.offsetWidth) tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px" else if (curX<leftedge) tipobj.style.left="5px" else tipobj.style.left=curX+offsetxpoint+"px" if (bottomedge<tipobj.offsetHeight) tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px" else tipobj.style.top=curY+offsetypoint+"px" tipobj.style.visibility="visible" } } function hideddrivetip(){ if (ns6||ie){ enabletip=false tipobj.style.visibility="hidden" tipobj.style.left="-1000px" tipobj.style.backgroundColor="" tipobj.style.width="" } } document.onmousemove=positiontip </script> <!---- pop-up - body - fim ------>Link para o comentário
Compartilhar em outros sites
0 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.