Access Denied when saving DOM document in JS
-
I am using Javascript, accessing a MSXML4.0 DOMDocument, in conjunction with a .XML and .XSL document. The .XSL document transforms the XML into a web page with a few forms, and a save button. There is javascript code to load the XML document into a DOM object on page load, modify the XML document in memory when the forms are modified, and save the DOM object when a button is pushed, but when I attempt to make a call to the DOM objects save(...) method, it throws a "Access Denied" javascript error. I have written a C++ app with a web browser control which does basically the same thing...browse to the file in the browser, open the file into a DOM (this time in C++, not JScript), and save the DOM in C++ and this works with no problem. Is there some sort of massaging I need to do to the filename, or some permissions I need to adjust to be able to save a file using the DOMDocument object in Javascript? Thanks in advance
-
I am using Javascript, accessing a MSXML4.0 DOMDocument, in conjunction with a .XML and .XSL document. The .XSL document transforms the XML into a web page with a few forms, and a save button. There is javascript code to load the XML document into a DOM object on page load, modify the XML document in memory when the forms are modified, and save the DOM object when a button is pushed, but when I attempt to make a call to the DOM objects save(...) method, it throws a "Access Denied" javascript error. I have written a C++ app with a web browser control which does basically the same thing...browse to the file in the browser, open the file into a DOM (this time in C++, not JScript), and save the DOM in C++ and this works with no problem. Is there some sort of massaging I need to do to the filename, or some permissions I need to adjust to be able to save a file using the DOMDocument object in Javascript? Thanks in advance
Javascript running in IE is not allowed to access the file system of the local machine. Why are you trying to save the document, is there another way you can get the same result? Regards Mark Smithson
-
Javascript running in IE is not allowed to access the file system of the local machine. Why are you trying to save the document, is there another way you can get the same result? Regards Mark Smithson
I was writing an editor, using the XSLT bound to an XML document to generate a HTML form, which used Javascript to tie into a XML DOM. I wanted to be able to save, and I found a way using a FileSystemObject activex control, but I was just wondering why I couldnt save using the Javascript. Thanks Jesse Rosalia