Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / December 2006



Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
eggie5@gmail.com - 31 Dec 2006 07:58 GMT
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
Martin Honnen - 31 Dec 2006 15:50 GMT
> 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.

Signature

    Martin Honnen
    http://JavaScript.FAQTs.com/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.