Deleting with XML - ADO
-
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
-
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
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?