File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes File Handling and Javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "File Handling and Javascript" Watch "File Handling and Javascript" New topic

File Handling and Javascript

S Mithal

Joined: Mar 17, 2005
Posts: 19
I am trying to display some information about a file on my local directory in an html page using javascript. Is there a way to do so without using ActiveXObject objects as this solution is browser specific. I am using this for now:

function getFileSize()
var fso = new ActiveXObject("Scripting.FileSystemObject");
fileObj = fso.GetFile("myFile");
return fileObj.Size;

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63548

No, for security reasons, native JavaScript has no access to the client file system. Thank goodness.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: File Handling and Javascript
It's not a secret anymore!