Library code snippets

Rotating Images

Rotating Image and Dynamically Change the Link



<html><head><title>Javascript Rotation</title>
<script language="javascript1.1">
var frames;
images=new Array(5);
links=new Array(5)
images[0]=new Image();
images[0].src="3ds_1.gif";
images[1]=new Image();
images[1].src="3ds_2.gif";
images[2]=new Image();
images[2].src="3dsbible.jpg";
images[3]=new Image();
images[3].src="3dsfundamentals.gif";
images[4]=new Image();
images[4].src="dreamweaver.jpg";
links[0]=new String();
links[0].value="http://www.amazon.com/exec/obidos/
ISBN=1562054198/listensoftwareso/";
links[1]=new String();
links[1].value="http://www.amazon.com/exec/obidos/
ISBN=1562058576/listensoftwareso/";
links[2]=new String();
links[2].value="http://www.amazon.com/exec/obidos/
ISBN=076454621X/listensoftwareso/";
links[3]=new String();
links[3].value="http://www.amazon.com/exec/obidos/
ISBN=0735700494/listensoftwareso/";
links[4]=new String();
links[4].value="http://www.amazon.com/exec/obidos/
ISBN=B00004GP3J/listensoftwareso/";
frames=0;
function animateImages()
{
   document.image_placeholder.src=images[frames].src;
     book_link.href=links[frames].value;
   frames=(frames+1)%5;
   timeout_id=setTimeout("animateImages()",2000);
}
</script>
</head>
<body bgcolor="white" onLoad="animateImages();">
<a href="javascript:0" name="book_link"><img src="3ds_1.gif" name="image_placeholder" border="0"></a>
</body>
</html>

Comments

  1. 01 Jan 1999 at 00:00

    This thread is for discussions of Rotating Images.

Leave a comment

Sign in or Join us (it's free).

David Nishimoto NishiSoft provides Part I of the Information Technology Project collaboration. Sign up and list your IT project tasks, assign task too friends, and get percent complete task. Part will include a wo...

Related podcasts

  • jQuery in ASP.NET

    In this episode Chris Brandsma, Rick Strahl, Dave Ward, Bertrand Le Roy, Scott Koon, and Steven Harman discuss Microsoft's jQuery in ASP.NET announcement.This episode of the Alt.NET Podcast is brought to you by LLBLGen Pro, the most mature O/R mapper and code generator out there.Are you loo...

Events coming up

  • Dec 8

    December Silicon Valley Ruby Meetup

    Moffett Field, United States

    In a World of Middleware, Who Needs Monolithic Applications? by Jon Crosby With Rack emerging as the standard for composing web applications and services, most recently with Rails adoption, an architectural shift is taking place. Learn how to create next generation web services by reusing existing Rack middleware and supplementing with your own components and micro-frameworks like Sinatra. Bio : Jon likes music, the Open Web, Ruby, Erlang, Haskell, Objective-C, JavaScript and coffee.

Want to stay in touch with what's going on? Follow us on twitter!