Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 8th, 2005, 01:45 AM
Registered User
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Listing of Directory Content

Hi All,
I have to show the content of a folder (all files and folders in that folder) in a HTML page using javascript only. I do not have to use server side scripting. I am trying to it by window.location but it is not so result oriented. Please advice if any one have some idea.

Thanks,
Ram

 
Old December 8th, 2005, 03:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

If you want to list the files from the server side then you will HAVE to use either some kind of server side code or set up the folder to have DIRECTORY LISTING enabled in the webserver so the listing is handled by the webserver.

If you want to list the files on a client machine instead then you may be able to use Javascript/ActiveX etc to do this as long as the user allows it.
 
Old December 9th, 2005, 02:03 AM
Registered User
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks a lot.
I am able to do it by using ActiveX object on my local machine. Actually my webpage is on Unix server and folder is in network. That server is not allowing to create object. Is there any way to do instead of using ActiveX??????


 
Old December 9th, 2005, 05:13 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

As Greg states security is going to be a problem.
If you want to view a folder's files via IE than you need to either use ActiveX, such as the FileSystemObject, or maybe one of the built in behaviours would help, anchorClick or httpFolder:
http://msdn.microsoft.com/library/de.../reference.asp

--

Joe (Microsoft MVP - XML)





Similar Threads
Thread Thread Starter Forum Replies Last Post
network directory listing using FileSystemObject? wyvern47 Classic ASP Components 1 December 15th, 2004 12:09 PM
FSO directory listing spinout Classic ASP Components 4 November 7th, 2004 03:18 AM
Listing Folder Content jmss66 Classic ASP Basics 7 August 9th, 2004 11:40 AM
Directory Listing Bleetz Pro JSP 1 September 20th, 2003 06:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.