Diaporama
guez
-
Utilisateur anonyme -
Utilisateur anonyme -
j'ai utilisé le code si dessous pour ma diapo mais il ne fonctionne pas en local com en ligne
<DIV ID=ejs_photo_box></div>
<script type="text/javascript">
ejs_photo = new Array;
<?
$a = 0;
$handle = opendir("photos");
while (($file = readdir())!=false) {
clearstatcache();
if($file!=".." && $file!=".")
{
echo "ejs_photo[$a] = 'photos/$file';
";
$a++;
}
}
closedir($handle);
?>
function ejs_aff_photos(num)
{
if(document.getElementById)
{
ejs_fin = "";
if(num!=0)
ejs_fin += "<A HREF=# onClick='ejs_aff_photos("+(num-1)+");return(false)'>< Précédent</A> ";
if(num!=(ejs_photo.length-1))
ejs_fin += "<A HREF=# onClick='ejs_aff_photos("+(num+1)+");return(false)'>Suivant ></A>";
document.getElementById("ejs_photo_box").innerHTML = "<CENTER><IMG SRC='"+ejs_photo[num]+"' BORDER=0><BR>"+ejs_fin+"</CENTER>";
}
}
window.onload = new Function("ejs_aff_photos(0)")
</script>
<DIV ID=ejs_photo_box></div>
<script type="text/javascript">
ejs_photo = new Array;
<?
$a = 0;
$handle = opendir("photos");
while (($file = readdir())!=false) {
clearstatcache();
if($file!=".." && $file!=".")
{
echo "ejs_photo[$a] = 'photos/$file';
";
$a++;
}
}
closedir($handle);
?>
function ejs_aff_photos(num)
{
if(document.getElementById)
{
ejs_fin = "";
if(num!=0)
ejs_fin += "<A HREF=# onClick='ejs_aff_photos("+(num-1)+");return(false)'>< Précédent</A> ";
if(num!=(ejs_photo.length-1))
ejs_fin += "<A HREF=# onClick='ejs_aff_photos("+(num+1)+");return(false)'>Suivant ></A>";
document.getElementById("ejs_photo_box").innerHTML = "<CENTER><IMG SRC='"+ejs_photo[num]+"' BORDER=0><BR>"+ejs_fin+"</CENTER>";
}
}
window.onload = new Function("ejs_aff_photos(0)")
</script>
A voir également:
- Diaporama
- Faire un diaporama photo avec musique windows 10 - Guide
- Diaporama gratuits - Télécharger - Visionnage & Diaporama
- Mettre plusieurs musique sur diaporama powerpoint - Forum Powerpoint
- Sélectionnez une extension correspondant à un fichier de présentation (diaporama). - Forum Powerpoint
- Insérer une vidéo dans un diaporama powerpoint - Guide
1 réponse
Salut !!!
Voila le script normallement corecte :
Donc, ce qui failait faire, c'était de mettre la balise PHP dans la page HTML et non dans le JAVASCRIPT !
Voila le script normallement corecte :
<HTML>
<BODY>
<?
$a = 0;
$handle = opendir("photos");
while (($file = readdir())!=false) {
clearstatcache();
if($file!=".." && $file!=".")
{
echo "ejs_photo[$a] = 'photos/$file';
";
$a++;
}
}
closedir($handle);
?>
<DIV ID=ejs_photo_box></div>
<script type="text/javascript">
ejs_photo = new Array;
function ejs_aff_photos(num)
{
if(document.getElementById)
{
ejs_fin = "";
if(num!=0)
ejs_fin += "<A HREF=# onClick='ejs_aff_photos("+(num-1)+");return(false)'>< Précédent</A> ";
if(num!=(ejs_photo.length-1))
ejs_fin += "<A HREF=# onClick='ejs_aff_photos("+(num+1)+");return(false)'>Suivant ></A>";
document.getElementById("ejs_photo_box").innerHTML = "<CENTER><IMG SRC='"+ejs_photo[num]+"' BORDER=0><BR>"+ejs_fin+"</CENTER>";
}
}
window.onload = new Function("ejs_aff_photos(0)")
</script>
Donc, ce qui failait faire, c'était de mettre la balise PHP dans la page HTML et non dans le JAVASCRIPT !