Monday 17 October 2011

Anyone know of software or a way I can get photos on my website to change everytime someone reloads the page.?

Looking to have pictures change to a new one if someone reloads the page or goes to a different one and comes back.Anyone know of software or a way I can get photos on my website to change everytime someone reloads the page.?By using this javascript in the html this can be done just replace the image names with yours and remove the links if you dont want them per an image.



%26lt;SCRIPT language=JavaScript%26gt;

/*

+---------------------------------------鈥?br>
| Ad Simple Copyright www.YugDesign.com |

+---------------------------------------鈥?br>
| This program may be used and hosted free of charge by |

|anyone for personal purpose as long as this copyright |

|notice remains intact. |

+---------------------------------------鈥?br>
*/

var img_width = %26quot;468%26quot;;

var img_height = %26quot;60%26quot;;

var img_title = %26quot;Click Here%26quot;;

var ad=new Array()

//insert here your images src

ad[0]='gray.jpg';

ad[1]='red.jpg';

ad[2]='black.jpg';

var links=new Array()

//insert here your links

links[0]='http://www.google.com';

links[1]='http://www.yahoo.com';

links[2]='http://www.gmail.com';

var xy=Math.floor(Math.random()*ad.length);

document.write('%26lt;a href=%26quot;'+links[xy]+'%26quot; target=%26quot;_blank%26quot;%26gt;%26lt;img src=%26quot;'+ad[xy]+'%26quot; width=%26quot;'+img_width+'%26quot; height=%26quot;'+img_height+'%26quot; alt=%26quot;'+img_title+'%26quot; border=%26quot;0%26quot;%26gt;%26lt;/a%26gt;');

%26lt;/SCRIPT%26gt;