views:

69

answers:

3

Hi,

If I load an HTML from file:// and in the HTML there's an AJAX 'GET' request to a relative URL, it means the URL is pointing to a file and the file is loaded.

Can I have a similar behavior for 'PUT'? Meaning overwrite the file's content with the AJAX data?

I need this so I can easily debug scripts without the need to setup an HTTP server to host them and reply to the requested URLs.

Thank you

A: 

I don't think so. Where would the data post to and what would process it?

Andy Gaskell
A: 

ExtJs has full REST on Ajax calls. Using the "core" release is free.

Check out their online documentation : http://extjs.com/products/extcore/manual/

Joshua
+1  A: 

As far as I know, the HTML/script model in current browsers does not allow changing local resources (sort of a sandbox - think of the mess that would occur if an HTML page could write to a local file). The file:// is just a way to tell the browser a resource it's looking for is local to the machine it's running on, so it won't need to utilize the network. So you can read local resources from script - not change them.

Why not just run a local web server? You'll need it anyway eventually.

Traveling Tech Guy