...

View Full Version : HELP - SLIDEIT FUNCTION assigning a specific folder for my images



bulinggitprojek
09-03-2006, 08:12 PM
hi,

this would be my first time to write a javascript. i am trying to create a slideshow and here is what i came up based from my research. this only works if my .html file and images file are on the same folder. i was hoping that i could at least have a specific folder, like "images", that would only contain all the images.

<html>
<head>
<script type="text/javascript">
<!--
var image1=new Image()
image1.src="image001.jpg"
var image2=new Image()
image2.src="image002.jpg"
var image3=new Image()
image3.src="image003.jpg"
//-->
</script>
</head>


<body>
<img src="image001.jpg" name="slideshow" width="360" height="288"/>

<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.slideshow.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>



i hope you guys can help me here. this might be the easiest question but like what ive said, this would be my first time hehe :D

thanks,
bulinggitprojekt

canadianjameson
09-03-2006, 08:21 PM
Hey :)

I wont discourage you from learning, but if you want some premade slideshows there are many free ones available.

I could toss you some links if you wanted

bulinggitprojek
09-03-2006, 08:28 PM
Hey canadianjameson,

Thanks for the quick response. That would be very much appreciated if you could refer some links to make this easier.




Hey :)

I wont discourage you from learning, but if you want some premade slideshows there are many free ones available.

I could toss you some links if you wanted

googleit
09-03-2006, 08:42 PM
try this one http://www.javascriptkit.com/script/script2/jsslide.shtml

bulinggitprojek
09-03-2006, 08:47 PM
Hey googleit,

Thanks for the link. Will try it then :D


try this one http://www.javascriptkit.com/script/script2/jsslide.shtml

canadianjameson
09-03-2006, 10:39 PM
since there are so many, i figure I should ask "what exactly would you like it to do?"

do you want it to be user-controllable, etc.

these will be good starting-points:
http://www.huddletogether.com/projects/lightbox2/
http://www.dynamicdrive.com/dynamicindex4/index.html



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum