Slideshow

T

TonyJeffs

I want to create a web-based slideshow where it'll hunt through all
the jpg files I put in a folder, irrespective of name or how many, and
cycle through them, one by one.
This would mean that whenever I have new pictures, I just upload
them, and they are automatically part of the slideshow merely by being
in the folder, without updating my code.
The problem, I think, is the security aspect of the web based utility
not having permission to look at files in one of its folders unless
they are named

Is this possible?
If not Javascript, what other language?
(I don't want the viewer to have to deliberately accept an activex
control, which seems one way I could make it work)

....I can dabble in a few languages, not great at any, but grateful for
a pointer in the right direction, if it's possible.

Cheers

Tont

Is it possible to set
 
B

Bob Bedford

For managing files you automatically upload on a server, you should do it on
the server side.
It can be done in ASP or PHP. don't know with javascript....

Let me get the script on ASP and I'll send it to you.

BoB
 
B

Bob Bedford

Here is the code for getting all files from a directory automatically. In my
case, I do show all thumbnails images with a link to bigger images. You may
change it for your needs. hope this helps.

<%
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

'Get the folder object associated with the directory
Dim objFolder
Set objFolder =
objFSO.GetFolder(Server.MapPath("../images/photogallery/thumbnails"))

'Loop through the Files collection
Dim objFile
For Each objFile in objFolder.Files
Response.Write "<div align=""center"">"
Response.Write "<a href=""../images/photogallery/images/"+objFile.Name+"""
onClick=""return
enlarge('../images/photogallery/images/"+objFile.Name+"',event)"">"
Response.Write "<img
src=""../images/photogallery/thumbnails/"+objFile.Name+"""
alt="""+objFile.Name+""" align=""bottom"" border=""1""><br>"
Response.Write "<br><br><br></a></div>"
Next

'Clean up!
Set objFolder = Nothing
Set objFile = Nothing
Set objFSO = Nothing
%>
 
L

Laurent Bugnion, GalaSoft

Hi,
I want to create a web-based slideshow where it'll hunt through all
the jpg files I put in a folder, irrespective of name or how many, and
cycle through them, one by one.
This would mean that whenever I have new pictures, I just upload
them, and they are automatically part of the slideshow merely by being
in the folder, without updating my code.
The problem, I think, is the security aspect of the web based utility
not having permission to look at files in one of its folders unless
they are named

Is this possible?
If not Javascript, what other language?
(I don't want the viewer to have to deliberately accept an activex
control, which seems one way I could make it work)

...I can dabble in a few languages, not great at any, but grateful for
a pointer in the right direction, if it's possible.

Cheers

Tont

Is it possible to set

This is exactly what I use WebLoadFile for:

http://www.galasoft-LB.ch/myjava/WebLoadFile/Demo/Demo.html

Laurent
 
F

Fabian

TonyJeffs hu kiteb:
I want to create a web-based slideshow where it'll hunt through all
the jpg files I put in a folder, irrespective of name or how many, and
cycle through them, one by one.
This would mean that whenever I have new pictures, I just upload
them, and they are automatically part of the slideshow merely by being
in the folder, without updating my code.
The problem, I think, is the security aspect of the web based utility
not having permission to look at files in one of its folders unless
they are named

Is this possible?
If not Javascript, what other language?
(I don't want the viewer to have to deliberately accept an activex
control, which seems one way I could make it work)

NOt tested, definately in need of further work, but...

var i = 0
while (i != NaN) {
preload = new Image();
preload.src = i + ".gif";
// test for undefined somehow
if (preload.src is undefined) { i = "a"; }
else { i = i + 1; }
}

You'd still need to number your files sequentially with this of course.
 
D

Dr John Stockton

JRS: In article <[email protected]>, seen in
news:comp.lang.javascript said:
NOt tested, definately in need of further work, but...

var i = 0
while (i != NaN) {
preload = new Image();
preload.src = i + ".gif";
// test for undefined somehow
if (preload.src is undefined) { i = "a"; }
else { i = i + 1; }
}

You'd still need to number your files sequentially with this of course.


IIRC, NaN is never equal to anything, not even another NaN or a copy of
itself. Moreover, a NaN is neither greater nor smaller than anything
else.

Better to use while (OK) { or do {...} while (OK) and compute
OK in the loop.

Consider

for (i=0;;i++) {
...
if (...) break
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top