Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-03-2006, 07:12 PM   PM User | #1
bulinggitprojek
New to the CF scene

 
Join Date: Sep 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
bulinggitprojek is an unknown quantity at this point
HELP - SLIDEIT FUNCTION assigning a specific folder for my images

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

thanks,
bulinggitprojekt
bulinggitprojek is offline   Reply With Quote
Old 09-03-2006, 07:21 PM   PM User | #2
canadianjameson
Senior Coder

 
Join Date: Jul 2003
Location: My pimped-out igloo in Canadia
Posts: 1,966
Thanks: 36
Thanked 0 Times in 0 Posts
canadianjameson is an unknown quantity at this point
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
__________________
Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)
canadianjameson is offline   Reply With Quote
Old 09-03-2006, 07:28 PM   PM User | #3
bulinggitprojek
New to the CF scene

 
Join Date: Sep 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
bulinggitprojek is an unknown quantity at this point
Hey canadianjameson,

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



Quote:
Originally Posted by canadianjameson
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 is offline   Reply With Quote
Old 09-03-2006, 07:42 PM   PM User | #4
googleit
Regular Coder

 
googleit's Avatar
 
Join Date: Jul 2006
Location: birmingham, uk
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
googleit is an unknown quantity at this point
try this one http://www.javascriptkit.com/script/.../jsslide.shtml
googleit is offline   Reply With Quote
Old 09-03-2006, 07:47 PM   PM User | #5
bulinggitprojek
New to the CF scene

 
Join Date: Sep 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
bulinggitprojek is an unknown quantity at this point
Hey googleit,

Thanks for the link. Will try it then

Quote:
Originally Posted by googleit
bulinggitprojek is offline   Reply With Quote
Old 09-03-2006, 09:39 PM   PM User | #6
canadianjameson
Senior Coder

 
Join Date: Jul 2003
Location: My pimped-out igloo in Canadia
Posts: 1,966
Thanks: 36
Thanked 0 Times in 0 Posts
canadianjameson is an unknown quantity at this point
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
__________________
Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)
canadianjameson is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:32 PM.


Advertisement
Log in to turn off these ads.