Onmouseover ne fonctionne pas sous firefox
lpblpb28
Messages postés
5
Statut
Membre
-
lpblpb28 Messages postés 5 Statut Membre -
lpblpb28 Messages postés 5 Statut Membre -
Bonjour,
Une petite fonction javascript "OnMouseOver" fonctionne bien sous Internet Explorer IE mais pas sous firefox 17.01
Quelqu'un peut me dire pourquoi?
Merci d'avance
Une petite fonction javascript "OnMouseOver" fonctionne bien sous Internet Explorer IE mais pas sous firefox 17.01
Quelqu'un peut me dire pourquoi?
Merci d'avance
A voir également:
- Onmouseover ne fonctionne pas sous firefox
- Downloadhelper firefox - Télécharger - Outils pour navigateurs
- Telecharger firefox - Télécharger - Navigateurs
- Exporter favoris firefox - Guide
- Ghostery firefox - Télécharger - Web & Internet
- Comment supprimer bing de firefox - Guide
4 réponses
le détail du javascript :
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0
if(ns){doc = "document."; sty = ""}
if(ie){doc = "document.all."; sty = ".style"}
var initialize = 0
var Ex, Ey, topColor, subColor, ContentNote
if(ie){
Ex = "event.x"
Ey = "event.y"
topColor = "#FF0000"
subColor = "#FFFFFF"
}
if(ns){
Ex = "e.pageX"
Ey = "e.pageY"
window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=overhere
topColor = "#000099"
subColor = "#00CCFF"
}
function MoveNote(layerName, FromTop, FromLeft, e){
if(ie){eval(doc + layerName + sty + ".top = " + (eval(FromTop) + document.body.scrollTop))}
if(ns){eval(doc + layerName + sty + ".top = " + eval(FromTop))}
eval(doc + layerName + sty + ".left = " + (eval(FromLeft) + 15))
}
function ReplaceContent(layerName){
if(ie){document.all[layerName].innerHTML = ContentNote}
if(ns){
with(document.layers[layerName].document)
{
open();
write(ContentNote);
close();
}
}
}
function Activate(){initialize=1}
function deActivate(){initialize=0}
function overhere(e){
if(initialize){
MoveNote("Note", Ey, Ex, e)
eval(doc + "Note" + sty + ".visibility = 'visible'")
}
else{
MoveNote("Note", 0, 0)
eval(doc + "Note" + sty + ".visibility = 'hidden'")
}
}
function EnterContent(layerName, TTitle, TContent){
ContentNote = '<table border="0" width="50" /*taille de l encadré*/ cellspacing="0" cellpadding="0">'+
'<tr><td width="100%" bgcolor="#000000">'+
'<table border="0" width="100%" cellspacing="1" cellpadding="0">'+
//'<tr><td width="100%" bgcolor='+topColor+'>'+
//'<table border="0" width="90%" cellspacing="0" cellpadding="0" align="center">'+
//'<tr><td width="100%" align="center">'+
//'<font class="NoteTitle"> '+TTitle+'</font>'+
//'</td></tr>'+
//'</table>'+
//'</td></tr>'+
'<tr><td width="100%" bgcolor='+subColor+'>'+
'<table border="0" width="90%" cellpadding="0" cellspacing="1" align="center">'+
'<tr><td width="100%">'+
'<font class="NoteContent">'+TContent+'</font>'+
'</td></tr>'+
'</table>'+
//'</td></tr>'+
'</table>'+
'</td></tr>'+
'</table>';
ReplaceContent(layerName)
}
Appel de la fonction java dans ma page HTML :
<SCRIPT language="JavaScript" src="NoteOnMouseOver_photoText_sur_texte.js">
</SCRIPT>
<LINK href="pagination.css" rel="stylesheet" type="text/css" />
<LINK rel="stylesheet" href="fds0.css">
</HEAD>
<SCRIPT language="JavaScript" src="/styles/Maxi.js"></SCRIPT>
<BODY onmousemove=overhere() background="../../../../images/FondFilets.gif" bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
Voilà pour le détail, mais je répète cette fonction fonctionne bien sous IE mais pas sous firefox !
faut il des modules complemantaires ?
Merci
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0
if(ns){doc = "document."; sty = ""}
if(ie){doc = "document.all."; sty = ".style"}
var initialize = 0
var Ex, Ey, topColor, subColor, ContentNote
if(ie){
Ex = "event.x"
Ey = "event.y"
topColor = "#FF0000"
subColor = "#FFFFFF"
}
if(ns){
Ex = "e.pageX"
Ey = "e.pageY"
window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=overhere
topColor = "#000099"
subColor = "#00CCFF"
}
function MoveNote(layerName, FromTop, FromLeft, e){
if(ie){eval(doc + layerName + sty + ".top = " + (eval(FromTop) + document.body.scrollTop))}
if(ns){eval(doc + layerName + sty + ".top = " + eval(FromTop))}
eval(doc + layerName + sty + ".left = " + (eval(FromLeft) + 15))
}
function ReplaceContent(layerName){
if(ie){document.all[layerName].innerHTML = ContentNote}
if(ns){
with(document.layers[layerName].document)
{
open();
write(ContentNote);
close();
}
}
}
function Activate(){initialize=1}
function deActivate(){initialize=0}
function overhere(e){
if(initialize){
MoveNote("Note", Ey, Ex, e)
eval(doc + "Note" + sty + ".visibility = 'visible'")
}
else{
MoveNote("Note", 0, 0)
eval(doc + "Note" + sty + ".visibility = 'hidden'")
}
}
function EnterContent(layerName, TTitle, TContent){
ContentNote = '<table border="0" width="50" /*taille de l encadré*/ cellspacing="0" cellpadding="0">'+
'<tr><td width="100%" bgcolor="#000000">'+
'<table border="0" width="100%" cellspacing="1" cellpadding="0">'+
//'<tr><td width="100%" bgcolor='+topColor+'>'+
//'<table border="0" width="90%" cellspacing="0" cellpadding="0" align="center">'+
//'<tr><td width="100%" align="center">'+
//'<font class="NoteTitle"> '+TTitle+'</font>'+
//'</td></tr>'+
//'</table>'+
//'</td></tr>'+
'<tr><td width="100%" bgcolor='+subColor+'>'+
'<table border="0" width="90%" cellpadding="0" cellspacing="1" align="center">'+
'<tr><td width="100%">'+
'<font class="NoteContent">'+TContent+'</font>'+
'</td></tr>'+
'</table>'+
//'</td></tr>'+
'</table>'+
'</td></tr>'+
'</table>';
ReplaceContent(layerName)
}
Appel de la fonction java dans ma page HTML :
<SCRIPT language="JavaScript" src="NoteOnMouseOver_photoText_sur_texte.js">
</SCRIPT>
<LINK href="pagination.css" rel="stylesheet" type="text/css" />
<LINK rel="stylesheet" href="fds0.css">
</HEAD>
<SCRIPT language="JavaScript" src="/styles/Maxi.js"></SCRIPT>
<BODY onmousemove=overhere() background="../../../../images/FondFilets.gif" bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
Voilà pour le détail, mais je répète cette fonction fonctionne bien sous IE mais pas sous firefox !
faut il des modules complemantaires ?
Merci