PDA

View Full Version : Update client side XML from client-side HTML page


mrmchase08
06-14-2010, 09:42 PM
Hey everybody...!
I'm fairly new to scripting with xml so bare with me.
I am trying to create a page to simplify creating an xml datasheet.
Neither the XML nor the html page will be located on a server.
It will be a simple client side html page where a user can enter data and when submitted the data will be added to a local xml sheet. (most-likely in the same folder)

If anyone could steer me in the correct direction that would be great...

Best Regards

Dormilich
06-15-2010, 09:35 AM
won’t work, since JavaScript has no writing permissions on the client file system.

mrmchase08
06-15-2010, 06:18 PM
So does that mean IF there was some way of doing it Javascript would be my only option...??
Or are there other client-side languages that I could try...??
Thanks!

Alex Vincent
06-15-2010, 08:57 PM
What he means is that, in the context of a web browser (which he assumes you're rendering your HTML interface), JavaScript cannot cause any changes to be saved to your local hard disk. He's right: the sandbox security model which most web browsers run under disallows it.

Now, there are ways around that. If you're running it through Firefox, you might be able to request privileges to do so ("UniversalXPConnect", I think, is what you would want).

Or, if you're willing to work with XUL instead of HTML, you could write a simple XUL application to modify the XML, and then run your XUL application from Firefox: https://developer.mozilla.org/en/XULRunner_tips#Using_Firefox_3_to_run_XULRunner_applications

XUL apps run in this way have full privileges. In fact, Firefox is a XUL application (with full privileges), that shows web pages in the sandbox I mentioned above.

mrmchase08
06-25-2010, 08:13 PM
Sorry For The Late Reply....!
@Alex I dont think im ready to go the XUL or .HTA route yet...
I thought about it when I first was researching possible solutions to my problem..

Now I have an even more daring (Yet Better!) idea...
I'm thinking I can write a Java Applet that will create the file for me, and embed the applet into the webpage...
If anyone has any prior knowledge to the subject feel free to add it in...
Hopefully this will work out... I'll let you guys know what happens...