# Java script help

**URL:** <https://forum.kirupa.com/t/java-script-help/274611>\
**Category:** Uncategorized\
**Created:** [November 1, 2008, 6:44am UTC](https://forum.kirupa.com/t/java-script-help/274611 "2008-11-01T06:44:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashadweb](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@ashadweb](https://forum.kirupa.com/u/ashadweb)\
**Post date:** [November 1, 2008, 6:44am UTC](https://forum.kirupa.com/t/java-script-help/274611/1 "2008-11-01T06:44:36Z")

</div>

hi im doing a javascript image rotation. but i have a problem i want to make images as links as images are rotating i want to rotate with the link this is the script i used. how to modify this?

thanks  
ash

> \<html\> \<head\> \<script type=“text/javascript”\> \<!-- var image1=new Image() image1.src=“firstcar.gif” var image2=new Image() image2.src=“secondcar” var image3=new Image() image3.src=“thirdcar.gif” //–\> \</script\>[COLOR=#000000] \</head\> [/COLOR]\<body\> \<img src=“firstcar.gif” name=“slide” width=“100” height=“56” /\> \<script\> \<!-- //variable that will increment through the images var step=1 function slideit(){ //if browser does not support the image object, exit. if (!document.images) return document.images.slide.src=eval(“image”+step+“.src”) if (step\<3) step++ else step=1 //call function “slideit()” every 2.5 seconds setTimeout(“slideit()”,2500) } slideit() //–\> \</script\> \</body\> \</html\>
