Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Can JavaScript...

Can JavaScript...
Thread Tools
l008com
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status: Offline
Reply With Quote
Jun 8, 2000, 01:14 PM
 
Can JavaScript count the files in an online directory? I wanna know this becuase i wanna make a script that will play a random sound file from a folder of sounds, but i wanna be able to just keep uploading the sounds without having to modify the script. As long as I can get javascript to count the files in the directory, I will be able to make the script no problem.

------------------
I see dead people.
     
YesToAll
Fresh-Faced Recruit
Join Date: May 2000
Location: New England, USA
Status: Offline
Reply With Quote
Jun 10, 2000, 03:17 PM
 
I don't think client-side javascript alone can do it. You need some server-side script technology to count files in a remote directory.

I know it's not as convenient, but you could move your script into a .js file, and that way you'd only have to edit the count in one location when you uploaded sound files. Wouldn't have to touch any of the html files.
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 10:45 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,