• Advertisement
Sign in to follow this  

[web] Possible to save xml file using javascript/html?

This topic is 4833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Still no more information.

Save it where? Is this form just on the web someplace or on the local machine or even a firefox extension?

Share this post


Link to post
Share on other sites
javascript probably isn't up to this task without some form of extension system on the client browser. The best thing for doing this is the use of server-side scripting components, do you have this option available to you?

Share this post


Link to post
Share on other sites
In some web browsers there exists an object which can be used to send HTTP requests to a server (independently of any page loading happening).

This is typically called XMLHttpRequest, and was originated by Microsoft. Mozilla has supported it for a while now and there are possibly some other browsers which do (Newer Opera and KHTML based browsers (Safari, Konqueror))

The exact method for creating this is slightly platform dependent. On IE on Win32, you need to use new ActiveXObject(somethingorother).

On most others, new XMLHttpRequest() should suffice.

Anyway, you can use this to send HTTP requests containing XML (or anything else, as it happens), and get the results back (in XML or anything else).

This can be used by client-side javascript to make server requests.

HOWEVER it only works if the server is the same as the page was loaded from that the scripts are in. This is an important security feature.

You can use it to load/save things from a web page which is driven by client scripts (for instance a high score table).

Mark

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement