Pergunta

I tried different methods to open and show a file on client without to send the file to a server.

Opening: I tried to access the file with javascript from a <input type=file>, but the security restriction seems to not allow that. I tried also <iframe src=file://local.path> with the same problem. Last i tried with new ActiveXObject('Scripting.FileSystemObject');, but I get always an error that automationserver could not create the Object.

For saving I tried to use execCommand('SaveAs',true) from TextRange and DocumentFragment. From DocumentFragment I'm able to save a file but it contains only <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">. From TextRange is no save dialog shown.

What could I do?

Foi útil?

Solução

From a web site, you cannot do any of this unless you use a signed script

From local file system, IE can use the filesystem object from an HTA

Outras dicas

Sorry,

You can not access the local file system through a browser without having the user install a plug-in/activex object.

It may be that you should try another cross-platform delivery method, such as Adobe Air.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top