Hi guys,
I am in the middle of making my website, and I been searching on this topic for over 2 days. I still couldn’t find strong php scripts to meet my demands. Here are my specifications. I need to place images (from server side) at FOUR different locations with constant rotation, href link, alt=””, and randomizing without showing the same image twice at the same time. I want this to be done with one / same php script. I found something close to specification, which I will post at bottom. I would like to control the time swap, name, herf, alt, place of image. If you guys can put any other neat effect to rotation, or neat features to image will be deeply appreciated. Here is what I have right now, I know this is in javascript but if it can be done in either php or javascript…http://www.phpbuilder.com/board/images/smilies/biggrin.gif
<script language="javascript">
<!--
var gallery = new Array();
gallery[0] = new Array("01.jpg","02.jpg","03.jpg","04.jpg","05.jpg");
gallery[1] = new Array("06.jpg","07.jpg","08.jpg","09.jpg","10.jpg");
gallery[2] = new Array("11.jpg","12.jpg","13.jpg","14.jpg","15.jpg");
gallery[3] = new Array("16.jpg","17.jpg","18.jpg","19.jpg","20.jpg");
gallery[4] = new Array("21.jpg","22.jpg","23.jpg","24.jpg","25.jpg");
function pickImageFrom(whichGallery)
{
var idx = Math.floor(Math.random() * gallery[whichGallery].length);
document.write('<img src="img/test/' + gallery[whichGallery][idx] + '">');
}
//-->
</script>
<div align="center"><script language="javascript">pickImageFrom(0);</script><br /><br />
<script language="javascript">pickImageFrom(1);</script><br /><br />
<script language="javascript">pickImageFrom(2);</script><br /><br />
<script language="javascript">pickImageFrom(3);</script><br /><br />
<script language="javascript">pickImageFrom(4);</script>
</div>