[RESOLU] Ca ne défile pas ?

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : [RESOLU] Ca ne défile pas ?

Re: Ca ne défile pas ?

par udolfo » 13 mai 2013, 19:49

Oki :D :D :D

Maintenant ça marche

Merci beaucoup

Re: Ca ne défile pas ?

par ghost5922 » 13 mai 2013, 18:47

Bonjour,

le code fonction voici
<img name="ChangingPix" src="Oasis3r.jpg" width="200" height="262">
<SCRIPT LANGUAGE="JavaScript">
<!--
var timeDelay = 5;
var Pix = new Array
("Oasis3r.jpg","Oasis-T2-new.jpg","Oasis-T3.jpg");
var howMany = Pix.length;
timeDelay *= 1000;
var PicCurrentNum = 0;
var PicCurrent = new Image();
PicCurrent.src = Pix[PicCurrentNum];
function startPix() {
setInterval("slideshow()", timeDelay);
}
function slideshow() {
PicCurrentNum++;
if (PicCurrentNum == howMany) {
PicCurrentNum = 0;
}
PicCurrent.src = Pix[PicCurrentNum];
document["ChangingPix"].src = PicCurrent.src;
}
//  End -->
startPix();
</script>

 

Re: Ca ne défile pas ?

par udolfo » 13 mai 2013, 17:59

J'ai essayer et maintenant il me donne une erreur de script

Ligne : 40
caractere : 1
erreur : erreur de syntaxe
code : 0

Re: Ca ne défile pas ?

par ghost5922 » 13 mai 2013, 16:41

Bonjour,

teste ceci
<img name="ChangingPix" src="Oasis3.jpg" width="1900" height="1262">
<SCRIPT LANGUAGE="JavaScript">
<!--
var timeDelay = 5;
var Pix = new Array
("Oasis3r.jpg","Oasis-T2-new.jpg","Oasis-T3.jpg","les-villas-oasis-new.jpg");
var howMany = Pix.length;
timeDelay *= 1000;
var PicCurrentNum = 0;
var PicCurrent = new Image();
PicCurrent.src = Pix[PicCurrentNum];
function startPix() {
setInterval("slideshow()", timeDelay);
}
function slideshow() {
PicCurrentNum++;
if (PicCurrentNum == howMany) {
PicCurrentNum = 0;
}
PicCurrent.src = Pix[PicCurrentNum];
document["ChangingPix"].src = PicCurrent.src;
}
//  End -->
startPix();
</script>

tu ne lancés pas la fonction pour la premier fois :)

Ca ne défile pas ?

par udolfo » 13 mai 2013, 12:15

Bonjour,

je me suis basé sur un script existant pour faire un diaporama défilant....mais ça ne défile pas, il reste fixe sur la première image
et comme je n'en touche pas une en Java si quelqu'un peut me dire pourquoi se serait sympa

Merci

Ah oui voici le script

<img name="ChangingPix" src="Oasis3.jpg" width="1900" height="1262">
<SCRIPT LANGUAGE="JavaScript">
<!--
var timeDelay = 5;
var Pix = new Array
("Oasis3r.jpg","Oasis-T2-new.jpg","Oasis-T3.jpg","les-villas-oasis-new.jpg");
var howMany = Pix.length;
timeDelay *= 1000;
var PicCurrentNum = 0;
var PicCurrent = new Image();
PicCurrent.src = Pix[PicCurrentNum];
function startPix() {
setInterval("slideshow()", timeDelay);
}
function slideshow() {
PicCurrentNum++;
if (PicCurrentNum == howMany) {
PicCurrentNum = 0;
}
PicCurrent.src = Pix[PicCurrentNum];
document["ChangingPix"].src = PicCurrent.src;
}
//  End -->
</script>