Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Access Denied when saving DOM document in JS

Access Denied when saving DOM document in JS

Scheduled Pinned Locked Moved XML / XSL
javascriptxmlhelpc++html
3 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jesse Rosalia
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • J Jesse Rosalia

      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

      M Offline
      M Offline
      Mark Smithson
      wrote on last edited by
      #2

      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

      J 1 Reply Last reply
      0
      • M 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

        J Offline
        J Offline
        Jesse Rosalia
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups