Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Javascript slide show in DreamWeaver


  • This topic is locked This topic is locked
9 replies to this topic

#1 JUICYboy

JUICYboy

  • Members
  • 537 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Anaheim, Ca
  • Local time:04:04 PM

Posted 18 April 2010 - 05:58 PM

Hi :thumbsup: ,

well I am working on adding a Java slide show to my DreamWeaver Template..

I copy and paste the code from here: http://www.javascriptkit.com/script/script2/jsslide.shtml

but then I edit the code to put my images in the template. Once I update my files and Preview in IE7 I have the "X" telling me the file path is incorrect.. or something.

So I think I have to edit my file path's to it don't I?

The images are located in the same file folder.. But when I copy and paste the code all I do is change the images from the examples to my image names..

Please help thanks.. good-bye

Edited by groovicus, 21 April 2010 - 07:29 PM.


BC AdBot (Login to Remove)

 


#2 JUICYboy

JUICYboy
  • Topic Starter

  • Members
  • 537 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Anaheim, Ca
  • Local time:04:04 PM

Posted 18 April 2010 - 07:48 PM

Here is the code that I have to change however I do not know if I have to create the file path from the beggining of my hard-drive like:

C:Desktop\Example.folder\Image folder\ Image.png

Or should I just type the file path from the folder only since it will be on a server anyways like:

Example.folder\Image folder\ Image.png

I also need to know the correct way in typing it because Dreamweaver says "error in line "XX".

Here is where I think the problem lays, I just don't know how to make the proper file path, and were to get it from.

<script>
<!--

//configure the paths of the images, plus corresponding target links

slideshowimages("computerproblems.png","Designyourwebsite.png","lightningprintslide.png","enespanol.png","Mainlogo.png")
slideshowlinks("C:\Documents and Settings\Felipe Admin\Desktop\techrepair101\images",)

//configure the speed of the slideshow, in miliseconds
var slideshowspeed=2000


#3 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:02:04 PM

Posted 18 April 2010 - 09:09 PM

You are making this way harder than it is.
<!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>

<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

<title>Javascript Image Rotator</title>



	<script type="text/javascript">

	

	var images =['image1.jpg',

						 'image2.jpg',

						 'image3.jpg'],

		i=0; 

	

	function chImage(){

		document.getElementById('images').src = images[i];

		i+=1;

		

		if(i === images.length){

		   i=0;

		}

		timeOut();

	}

	

	function timeOut(){

		setTimeout('chImage()', 1000);	  

	}

	

	</script>

</head>



<body onload="chImage()">

	<div>

	   <img id="images" src=""/>

	</div>

</body>



</html>


#4 JUICYboy

JUICYboy
  • Topic Starter

  • Members
  • 537 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Anaheim, Ca
  • Local time:04:04 PM

Posted 20 April 2010 - 09:06 PM

Oh, :thumbsup:

Were am I going wrong?

Or should I use the code you mentioned and just change the image names?

#5 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:02:04 PM

Posted 20 April 2010 - 09:37 PM

Yes, you can use my code and just change the image names. That is why I shared it with you. :thumbsup:

#6 JUICYboy

JUICYboy
  • Topic Starter

  • Members
  • 537 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Anaheim, Ca
  • Local time:04:04 PM

Posted 21 April 2010 - 07:06 PM

Thank-you sooooo much :flowers:

I just could not understand what I was doing wrong I researched it, tried to fix it it did not work till now.

Thank-you. :thumbsup:

Edited by JUICYboy, 21 April 2010 - 07:06 PM.


#7 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:02:04 PM

Posted 21 April 2010 - 07:21 PM

You're welcome. Javascript is a bit weird at first, but it is a very powerful language.

#8 JUICYboy

JUICYboy
  • Topic Starter

  • Members
  • 537 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Anaheim, Ca
  • Local time:04:04 PM

Posted 22 April 2010 - 12:26 PM

Thank-you

Edited by JUICYboy, 22 April 2010 - 01:20 PM.


#9 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:02:04 PM

Posted 22 April 2010 - 12:35 PM

setTimeout('chImage()', 1000);

1000 = 1 second

#10 JUICYboy

JUICYboy
  • Topic Starter

  • Members
  • 537 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Anaheim, Ca
  • Local time:04:04 PM

Posted 01 May 2010 - 08:10 PM

This helped out a lot




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users