javascript - work with folders using activexobject -
i need create folder,copy , delete. i've created several javascript functions - path folder, delete folder,create , re-create folder.
but when seek run in google chrome i've got exception
i thought problem activex. in ie doesn't work either.
<html> <head> <meta charset="utf-8"> <script type="text/javasript"> function onfolder(){ var ob = new activexobject("scripting.filesystemobject"); var name = document.getelementbyid("idtextbox1").value; var path = document.getelementbyid("idtextbox2").value; var x = path + "\\" + name; homecoming x; } function oncreate(){ var ob = new activexobject("scripting.filesystemobject"); var path = onfolder(); var x = ob.createfolder(path); } function oncopy(){ var ob = new activexobject("scripting.filesystemobject"); var source = onfolder(); var dest = document.getelementbyid("idtextbox3").value; ob.copyfolder(source,dest + "\\"); } function ondelete(){ var ob = new activexobject("scripting.filesystemobject"); var folder = onfolder(); ob.deletefolder(folder); } </script> </head> <body> folder name<input type="text" id="idtextbox1"> <br> destination<input type="text" id="idtextbox2"> <br> re-create destination<input type="text" id="idtextbox3"> <br> <input type="button" id="idbutton1" value="create" onclick="oncreate()"> <input type="button" id="idbutton2" value="copy" onclick="oncopy()"> <input type="button" id="idbutton3" value="delete" onclick="ondelete()"> </body> </html>
what's problem? activex? because think javascript functions correct.
the big problem using chrome chrome. activex works in ie because non-standard function. , trying do, security level has on low unconventional. javascript not language trying access or update computers file system.
javascript activex
No comments:
Post a Comment