By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,599 Members | 1,872 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,599 IT Pros & Developers. It's quick & easy.

Javascript for fetching and displaying jpgs ???

P: n/a
Hi All

Please help me out with this thing in javascript. I am dumb in the
world of JS/Html/...

I have a url, say www.someurl.com. It has a list of jpgs that can
accessed as www.something.com/one.jpg or www..../two.jpg etc. Now i
need to get the list of the jpgs and then display it on a web page one
by one, triggered by a timer. I have to do this using javascript.

Please help me in doing it.

Thanks

Aug 25 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Check for some premade ones at
http://www.javascriptkit.com/cutpastejava.shtml under slideshows
section.

Danny
Aug 26 '06 #2

P: n/a
VivekR wrote:
Hi All

Please help me out with this thing in javascript. I am dumb in the
world of JS/Html/...

I have a url, say www.someurl.com. It has a list of jpgs that can
accessed as www.something.com/one.jpg or www..../two.jpg etc. Now i
need to get the list of the jpgs and then display it on a web page one
by one, triggered by a timer. I have to do this using javascript.

Please help me in doing it.

Thanks
I don't know if that is what you wanted, but this is a start..

// this will build an array with all images with a .jpg extension
var allJPGs = [];
for (var i=0; i<document.images.length; i++){
if ( document.images[i].src.match( /\.jpg$/i ) ) {
allJPGs.push( document.images[i].src );
}
}

Aug 26 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.