Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File Handling and Javascript

 
S Mithal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64843
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, for security reasons, native JavaScript has no access to the client file system. Thank goodness.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic