Hi,
I am trying to display 5 pics named "pic1", "pic2"....."pic5" in one div.
I have settled that the div will be visible after 5000 ms, and then i have settled cleartimeout function to make the div again hidden. I need to revise it 5 times so that 5 pictures will display in one div one by one.
Please help me by correcting the following code:
<td>
<?
$no = 1;
while( $no < 5 )
{
$pic = "pic".$no;
echo $pic;
?>
<script> album(); </script>
<div id="pic">
<img src="images/journeys/gallery/<? echo $R4["$pic"]; ?>" width="200" height="200" /></div>
<script> album_hide(); </script>
<?
$no+= 1;
$pic= "";
}
?>
</td>
Java script functions are:
function album()
{
t = setTimeout("document.getElementById('pic').style.visibility = 'visible' ",5000);
}
function album_hide()
{
clearTimeout(t);
}
Thanks for your concern and time.