You are here: irt.org | About | Feedback | 1975 [ previous next ]
Feedback on:
irt.org FAQ Knowledge Base Q19
Sent by
Greg Lewis on November 09, 2000 at 02:05:09:
Technical:
Not technical enough
Comments:
there is a way in netscape to do this and I am sure Internet explorer can also. Below I have code that can read any file on the clients machine, but only with their approval. This code only works on Netscape:
function readFromFile(filename) {
var text = ""
var filechar
netscape.security.PrivilegeManager.enablePrivilege('UniversalFileAccess')
var file = new java.io.File(filename)
var FileReader = new java.io.FileReader(file)
filechar = FileReader.read()
while (filechar != -1) {
text = text + String.fromCharCode(filechar)
filechar = FileReader.read()
}
FileReader.close()
return text
}
Other feedback on 'irt.org FAQ Knowledge Base Q19' - show all