save document fragment

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • deepthi230
    New Member
    • Feb 2008
    • 8

    #1

    save document fragment

    i need to save a document fragment in my local file system, which i need to retrieve later and insert into the dom tree.in what form can i save it and are there any methods in javascript for the same??
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    unfortunatly ou cannot access the local filesystem with javascript ... except: cookies

    kind regards

    Comment

    • deepthi230
      New Member
      • Feb 2008
      • 8

      #3
      the package, which i am scripting, is installed in mozillas chrome system.so i can access my local file system.

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        then save it as xml and later on read the xml-document like it is described here

        kind regards

        Comment

        • rnd me
          Recognized Expert Contributor
          • Jun 2007
          • 427

          #5
          if you are using chrome, it would likely be easiest to use .toSource(), and save the JSON to your file.

          it can be added later even without the chrome by pointing a script tag to your file.

          one caveat ive had: the noScript extension (which i highly recommend) will block access to local files by default.

          Comment

          Working...