wood burning stoves*
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
Author

File Handling and Javascript

S Mithal
Greenhorn

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;
}

TIA
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61309
    
  66

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]
 
GeeCON Prague 2014
 
subject: File Handling and Javascript