[Ilugc] slide show using php
- From: suresh1876@xxxxxxxxx (Suresh Kumar)
- Date: Thu Jan 31 09:38:41 2008
you can do so by calling back the same php file after a time interval
and
by using a get method in which you you send the array element number of
the
next slide.
<img src=
<?
for ($i; count($imagesArray);$i++)
{
echo $imagesArray[$i];
}
?>
</img>
i also want to incorporate delay in between the display of images.
the time delay can be incorporated by running a javascript counter in
the
client side.
Thank you friends.. yes i had to use javascript only..
here is the way i have implemented..
<script type="text/javascript" language="javascript1.3">
currentIndx=0;
MyImages=new Array();
var count=<? echo count($ImageArray); ?>;
<? for($i=0;$i<count($ImageArray);$i++)
{
?>
MyImages[<? echo $i?>]=<? echo
$ImageArray[$i][URL]?>;
<? } ?>
var delay = setTimeout("dispImg() ",5000);
function dispImg()
{
if (currentIndx<MyImages.length)
{
currentIndx=currentIndx+1;
}
else
{
currentIndx=0;
}
document.dynImage.src=MyImages[currentIndx];
var delay1 = setTimeout("dispImg() ",5000);
}
</script>
<img src= "" name="dynImage" alt="image1" width="387"
height="256" />
with regards
J Suresh Kumar
99400 95614
Other related posts: