Saving a file on the server w/ js, ie no server code

E

eggie5

I am creating an XML document on my page with javascript. My question
is, is it possible to save that xml file on the server (I have write
permissions) only using javascript, ie no server code? This task would
be trivial using server code, but I was wondering if I can do it all
with client code and post backs? Well, any input?

Thanks,
Alex
 
M

Martin Honnen

I am creating an XML document on my page with javascript. My question
is, is it possible to save that xml file on the server (I have write
permissions) only using javascript, ie no server code? This task would
be trivial using server code, but I was wondering if I can do it all
with client code and post backs? Well, any input?

You could try a HTTP PUT request with the body of the request being the
XML. That is possible (in theory) with XMLHttpRequest/XMLHTTP, not sure
all implementations support HTTP PUT. On the other hand having a server
open to accept a PUT without some sort of protection is not a good idea.
And if you have some authentication in place then the code on your web
page would show the credentials to the rest of the world.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top