Problème javascript/firefox
extrem_encoder
Messages postés
1
Date d'inscription
Statut
Membre
Dernière intervention
-
artragis Messages postés 481 Date d'inscription Statut Membre Dernière intervention -
artragis Messages postés 481 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
J'ai mis en place un diaporama automatique sur un site : http://mapl4d.free.fr/
Sur IE le redimensionnement des images est impeccable mais pas sous firefox.
Voici un bout de mon code :
<script type="text/javascript">
<!--
var timeDelay = 3;
var Pix = new Array
("delacroix01.jpg"
,"delacroix02.jpg"
,"delacroix03.jpg"
);
var howMany = Pix.length;
timeDelay *= 1000;
var PicCurrentNum = 0;
var PicCurrent = new Image();
function startPix() {
setInterval("slideshow()", timeDelay);
}
function slideshow() {
PicCurrentNum++;
if (PicCurrentNum == howMany) {
PicCurrentNum = 0;
}
PicCurrent.src = Pix[PicCurrentNum];
document.getElementById("ChangingPix").src = PicCurrent.src;
document.getElementById("ChangingPix").style.width = 50*PicCurrent.width/100+"px";
document.getElementById("ChangingPix").style.height = 50*PicCurrent.height/100+"px";
}
// End -->
</script>
<p align="center">
<img alt="" id="ChangingPix" src="delacroix01.jpg" width="700px" height="548px">
</p>
Merci.
J'ai mis en place un diaporama automatique sur un site : http://mapl4d.free.fr/
Sur IE le redimensionnement des images est impeccable mais pas sous firefox.
Voici un bout de mon code :
<script type="text/javascript">
<!--
var timeDelay = 3;
var Pix = new Array
("delacroix01.jpg"
,"delacroix02.jpg"
,"delacroix03.jpg"
);
var howMany = Pix.length;
timeDelay *= 1000;
var PicCurrentNum = 0;
var PicCurrent = new Image();
function startPix() {
setInterval("slideshow()", timeDelay);
}
function slideshow() {
PicCurrentNum++;
if (PicCurrentNum == howMany) {
PicCurrentNum = 0;
}
PicCurrent.src = Pix[PicCurrentNum];
document.getElementById("ChangingPix").src = PicCurrent.src;
document.getElementById("ChangingPix").style.width = 50*PicCurrent.width/100+"px";
document.getElementById("ChangingPix").style.height = 50*PicCurrent.height/100+"px";
}
// End -->
</script>
<p align="center">
<img alt="" id="ChangingPix" src="delacroix01.jpg" width="700px" height="548px">
</p>
Merci.
A voir également:
- Problème javascript/firefox
- Telecharger firefox - Télécharger - Navigateurs
- Video downloadhelper firefox - Télécharger - Outils pour navigateurs
- Exporter favoris firefox - Guide
- Telecharger javascript - Télécharger - Langages
- Ghostery firefox - Télécharger - Web & Internet