Current location: Hot Scripts Forums » General Web Coding » JavaScript » Rotating Image

Rotating Image

Reply
  #1 (permalink)  
Old
New Member
 
Join Date: Jul 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rotating Image

Hi not sure if anyone can help, I have been using a very basic script to rotate some images on a webpage. An example is below:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title></title>
<link href="css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
	var image1=new Image()
	image1.src="images/image1.jpg" 
	
	var image2=new Image()
	image2.src="images/image2.jpg"

	var image3=new Image()
	image3.src="images/image3.jpg" 
 //-->
</script>
</head>

<body>
<div id="body2">
<img src="images/image1.jpg" name="slide" align="left" alt="" height="300" width="225" class="imgl"/>
<script>
<!--
	
	var step=1
	function slideit(){
	if (!document.images)
	return
	document.images.slide.src=eval("image"+step+".src")
	
	if (step<3)
	step++
	else
	step=1

	setTimeout("slideit()",3000)

	}
	
	slideit()

	//-->
</script>
</div>
</body>
</html>
Does anyone know how to add in a link to the image to a page on the site.

However a different page for each of the three images.

Thanks in advance,

Andrew
Reply With Quote

Featured Marketplace Scripts (view more)

Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP & MYSQL Same Table Ishmell PHP 7 06-28-09 11:36 PM
background image rotating blinn_shade JavaScript 10 01-20-09 03:41 AM
div css theighost CSS 11 09-14-08 02:30 AM
displaying text over image ketanco CSS 10 09-11-08 07:39 PM
Rotating Image by Mouse Drag Harlee Script Requests 1 07-28-08 09:27 AM


All times are GMT -5. The time now is 06:21 AM.
vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.