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. Database & SysAdmin
  3. Database
  4. Deleting with XML - ADO

Deleting with XML - ADO

Scheduled Pinned Locked Moved Database
javascripthtmlcomxmlhelp
2 Posts 2 Posters 0 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
    Jonavis
    wrote on last edited by
    #1

    Honestly Im not very sure of what language Im working with here. The file is called upload.asp and it is called upon by a javascript in an HTML file pretty much what it does is recieve some variables to upload a file. But what I need is to delete the same file... I'll send the info of the folder, the file name and path so that I can delete it. ------------------------------------------ var doc = new ActiveXObject( 'Msxml2.DomDocument' ); doc.load( Request ); var elt = doc.selectSingleNode( 'root/file' ); var href = elt.getAttribute( 'href' ); href = href.replace( /.*[\\\/](.*)/, '$1' ); var folder = '/images/'; //folder += elt.getAttribute( 'folder' ); var name = elt.getAttribute( 'name' ); var path = elt.getAttribute( 'path' ); var all = path + folder + href var str = new ActiveXObject( 'Adodb.Stream' ); str.type = 1; str.open(); str.write( elt.nodeTypedValue ); str.saveToFile( all, 2 ); str.close(); Response.contentType = 'text/xml'; Response.write( '' ); str = null; doc = null; ------------------------------------------ HELP! Jon X-ZD Designs

    P 1 Reply Last reply
    0
    • J Jonavis

      Honestly Im not very sure of what language Im working with here. The file is called upload.asp and it is called upon by a javascript in an HTML file pretty much what it does is recieve some variables to upload a file. But what I need is to delete the same file... I'll send the info of the folder, the file name and path so that I can delete it. ------------------------------------------ var doc = new ActiveXObject( 'Msxml2.DomDocument' ); doc.load( Request ); var elt = doc.selectSingleNode( 'root/file' ); var href = elt.getAttribute( 'href' ); href = href.replace( /.*[\\\/](.*)/, '$1' ); var folder = '/images/'; //folder += elt.getAttribute( 'folder' ); var name = elt.getAttribute( 'name' ); var path = elt.getAttribute( 'path' ); var all = path + folder + href var str = new ActiveXObject( 'Adodb.Stream' ); str.type = 1; str.open(); str.write( elt.nodeTypedValue ); str.saveToFile( all, 2 ); str.close(); Response.contentType = 'text/xml'; Response.write( '' ); str = null; doc = null; ------------------------------------------ HELP! Jon X-ZD Designs

      P Offline
      P Offline
      Paul Watson
      wrote on last edited by
      #2

      Not sure what your question is. If you are asking what language that is, then it is JScript on the server side. regards, Paul Watson Bluegrass South Africa Brian Welsch wrote: "blah blah blah, maybe a potato?" while translating my Afrikaans. Crikey! ain't life grand?

      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