HighDots Forums  

Slideshow

Javascript JavaScript language (comp.lang.javascript)


Discuss Slideshow in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
TonyJeffs
 
Posts: n/a

Default Slideshow - 12-04-2003 , 08:57 AM






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

Reply With Quote
  #2  
Old   
Bob Bedford
 
Posts: n/a

Default Re: Slideshow - 12-04-2003 , 09:11 AM






try www.dynamicdrive.com

"TonyJeffs" <tonyjeffs (AT) aol (DOT) com> a écrit dans le message de
news:8ec4c623.0312040557.23962392 (AT) posting (DOT) google.com...
Quote:
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



Reply With Quote
  #3  
Old   
Bob Bedford
 
Posts: n/a

Default Re: Slideshow - 12-04-2003 , 09:14 AM



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

"TonyJeffs" <tonyjeffs (AT) aol (DOT) com> a écrit dans le message de
news:8ec4c623.0312040557.23962392 (AT) posting (DOT) google.com...
Quote:
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



Reply With Quote
  #4  
Old   
Bob Bedford
 
Posts: n/a

Default Re: Slideshow - 12-04-2003 , 09:29 AM



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
%>
"Bob Bedford" <bedford1 (AT) YouKnowWhatToDohotmail (DOT) com> a écrit dans le message
de news:3fcf407c$0$770$5402220f (AT) news (DOT) sunrise.ch...
Quote:
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

"TonyJeffs" <tonyjeffs (AT) aol (DOT) com> a écrit dans le message de
news:8ec4c623.0312040557.23962392 (AT) posting (DOT) google.com...
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





Reply With Quote
  #5  
Old   
Laurent Bugnion, GalaSoft
 
Posts: n/a

Default Re: Slideshow - 12-04-2003 , 10:03 AM



Hi,

TonyJeffs wrote:

Quote:
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/Web...Demo/Demo.html

Laurent
--
Laurent Bugnion, GalaSoft
Webdesign, Java, javascript: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch



Reply With Quote
  #6  
Old   
Fabian
 
Posts: n/a

Default Re: Slideshow - 12-04-2003 , 04:42 PM



TonyJeffs hu kiteb:

Quote:
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[i] = new Image();
preload[i].src = i + ".gif";
// test for undefined somehow
if (preload[i].src is undefined) { i = "a"; }
else { i = i + 1; }
}

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

--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk



Reply With Quote
  #7  
Old   
Dr John Stockton
 
Posts: n/a

Default Re: Slideshow - 12-05-2003 , 08:35 AM



JRS: In article <bqoak2$24rb2c$1 (AT) ID-174912 (DOT) news.uni-berlin.de>, seen in
news:comp.lang.javascript, Fabian <lajzar (AT) hotmail (DOT) com> posted at Fri, 5
Dec 2003 06:42:23 :-
Quote:
NOt tested, definately in need of further work, but...

var i = 0
while (i != NaN) {
preload[i] = new Image();
preload[i].src = i + ".gif";
// test for undefined somehow
if (preload[i].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
}

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.