par
orell1 » 15 oct. 2010, 15:20
Je viens de trouver ce code, il fonction très bien sous firefox ! mais sous IE c'est la cata! toute ma mise en page est déformée!
voici mon code
<!-- DEBUT DU SCRIPT -->
<SCRIPT LANGUAGE="JavaScript">
ejs_logo_url = "monimage.png";
ejs_logo_redir = "redirection vers une page de mon site";
if (document.getElementById)
{
var staticlogo=new Image;
staticlogo.src=ejs_logo_url;
document.write('<div id="ejs_logo" style="z-index:200;position:absolute;width:'+staticlogo.width+';height:'+staticlogo.height+'"><a href="'+ejs_logo_redir+'" target=_blank><img src="'+staticlogo.src+'" border=0 /></a></div><div id="ejs_logo2" style="z-index:100;position:absolute;width:'+staticlogo.width+';height:'+staticlogo.height+';background:transparent;filter:alpha(opacity=40); -moz-opacity: .4;"></a></div>')
ejs_scx = document.body.clientWidth;
ejs_scy = document.body.clientHeight;
document.getElementById("ejs_logo").style.top=(ejs_scy-staticlogo.height-30);
document.getElementById("ejs_logo").style.left=(ejs_scx-staticlogo.width-30);
document.getElementById("ejs_logo2").style.top=(ejs_scy-staticlogo.height-25);
document.getElementById("ejs_logo2").style.left=(ejs_scx-staticlogo.width-25);
}
function logoit()
{
if (document.getElementById)
{
w2=document.body.scrollTop;
document.getElementById("ejs_logo").style.top=(w2+ejs_scy-staticlogo.height-30);
document.getElementById("ejs_logo2").style.top=(w2+ejs_scy-staticlogo.height-25);
setTimeout("logoit()",1);
}
}
window.onload=logoit
</SCRIPT>
<!-- FIN DU SCRIPT -->
Pour que ce script fonctionne je l'ai inséré dans l'entête de ma page index.php à l'aide de include-once ("monfichier.html");
Comment éviter ce décalage ? alors que ce script est logiquement optimisé pour s'afficher sur ous les navigateurs...
Script trouvé ici :
http://www.editeurjavascript.com/script ... e_1_57.php
Merci!
Je viens de trouver ce code, il fonction très bien sous firefox ! mais sous IE c'est la cata! toute ma mise en page est déformée!
voici mon code
[html]
<!-- DEBUT DU SCRIPT -->
<SCRIPT LANGUAGE="JavaScript">
ejs_logo_url = "monimage.png";
ejs_logo_redir = "redirection vers une page de mon site";
if (document.getElementById)
{
var staticlogo=new Image;
staticlogo.src=ejs_logo_url;
document.write('<div id="ejs_logo" style="z-index:200;position:absolute;width:'+staticlogo.width+';height:'+staticlogo.height+'"><a href="'+ejs_logo_redir+'" target=_blank><img src="'+staticlogo.src+'" border=0 /></a></div><div id="ejs_logo2" style="z-index:100;position:absolute;width:'+staticlogo.width+';height:'+staticlogo.height+';background:transparent;filter:alpha(opacity=40); -moz-opacity: .4;"></a></div>')
ejs_scx = document.body.clientWidth;
ejs_scy = document.body.clientHeight;
document.getElementById("ejs_logo").style.top=(ejs_scy-staticlogo.height-30);
document.getElementById("ejs_logo").style.left=(ejs_scx-staticlogo.width-30);
document.getElementById("ejs_logo2").style.top=(ejs_scy-staticlogo.height-25);
document.getElementById("ejs_logo2").style.left=(ejs_scx-staticlogo.width-25);
}
function logoit()
{
if (document.getElementById)
{
w2=document.body.scrollTop;
document.getElementById("ejs_logo").style.top=(w2+ejs_scy-staticlogo.height-30);
document.getElementById("ejs_logo2").style.top=(w2+ejs_scy-staticlogo.height-25);
setTimeout("logoit()",1);
}
}
window.onload=logoit
</SCRIPT>
<!-- FIN DU SCRIPT -->
[/html]
Pour que ce script fonctionne je l'ai inséré dans l'entête de ma page index.php à l'aide de include-once ("monfichier.html");
Comment éviter ce décalage ? alors que ce script est logiquement optimisé pour s'afficher sur ous les navigateurs...
Script trouvé ici : http://www.editeurjavascript.com/scripts/scripts_publicite_1_57.php
Merci!