I need help writing a script to make pictures rotate ever 5 seconds. I have no clue how to get the pictures to rotate every 5 seconds. I made a file called it pictures.js
[B][U]In the file I put
Picture[1]= and so on.
[B]
[B][U]To end the file I used
[FONT="]function randomorder(targetarray, spacing) {[/FONT][FONT="] var randomorder=new Array()[/FONT][FONT="] var the_one[/FONT][FONT="] var z=2[/FONT][FONT="] for (i=0;i<targetarray.length;i++)[/FONT][FONT="] randomorder[i]=i[/FONT][FONT="] [/FONT][FONT="] while (z<targetarray.length) {[/FONT][FONT="] the_one=Math.floor(Math.random()*targetarray.length)[/FONT][FONT="] if (targetarray[the_one]!=”_selected!”){[/FONT][FONT="] document.write(targetarray[the_one]+spacing)[/FONT][FONT="] targetarray[the_one]=”
[B][U]On my webpage to call the js I used
[/FONT] <script src=”pictures.js” type=”text/javascript”></script> <p align=”center”> <script type=”text/javascript”> randomorder(picture, ‘<br><br>’) </script> </p>
With this code can I add a timer to make the pictures rotate on there own or do I have to write another whole code to make this work? Thanks!