This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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: 63353

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

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