Monday, 8 December 2014

Jquery to overwrite XML text node - server side



I've an XML file with all my data. I'm then transforming all the XML into presentable HTML and styling with XSL. All of this is being done on the server.


So let's say in my XML file, I have:



<hey> Stack overflow </hey>


Then when the web page is running it looks like:



<p> Stack overflow </p> <button onclick="myFunction()">Click me</button>


What script can I use so when the button is clicked, the user gets prompted to enter a number 1-10. Then Whatever the user enters replaces the content of the hey node in the XML file and displays it back.


I know how to prompt and get input, I'm lost lost as to how to overwrite the content in the XML file and save it.


No comments:

Post a Comment