Forum Moderators: open

Message Too Old, No Replies

dynamic list/links from client folder content

         

RandyLude92

4:47 pm on Oct 1, 2009 (gmt 0)

10+ Year Member



Hi all,

I guess my first post around here might as well be one heck of a head scratcher (it's had me stumped for a month now). so here goes...

I'm trying to cook up a javascript/activeX solution for building a dynamic array from a specific folder on the client side machine. then turning that array into a list of links. then (to a much simpler point) have those links targeted at an iframe within the window for display.

targeting the iframe is a no brainer, and i've got that well covered but turning the folder contents into links is the part that's driving me up a wall!

PHP, ASP, and anything else like that is a strict NO-GO since this page is only for viewing on a VERY simple intranet site, so html/javascript is the only option.

to give a little more insight:
all systems viewing page are XP pro & IE 7
files to be indexed are in a static folder on a shared drive accessable to all clients from the network
but drive/location is not directly visible to the server, so it needs to use client-side processing to access it.

all my attempts have gotten me nowhere so anybody with fresh ideas for script is welcome. maybe it will jog my brain and get me out of this slump :)

rainborick

6:30 pm on Oct 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



To my knowledge, you can't read a directory in pure JavaScript. You might be able to do it with VBScript/JScript's FileSystemObject if you're in a pure Windows/MSIE shop. Check out the MSDN Developer Library for a start in their Web Development/Scripting/Windows Scripting Technologies/ section.

RandyLude92

6:45 pm on Oct 1, 2009 (gmt 0)

10+ Year Member



it will be run on pure windoews/ie7 setup and to my knowledge all clients have "windows scripting host" enabled so FileSystemObject (afaik is activeX not requiring VBS host) is exactly what i was thinking but i just can't seem to make it work. i've found examples in tons of places of using it to open an explorer window of the directory but i need the contents of the target directory in an array to use as links.