Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit XML Form

Status
Not open for further replies.

ITBusiness

Programmer
Jul 6, 2001
5
US
Hi all,
On Form Submit,using the Java Script can i store
file data in the XML format and store it in the local file
 
yes : use the faq on how to retrieve queries element, and build (with document.write()) a new xml page and ask the user to save it
 
Hi ,
Could You Please be precise with the code on how to save the data in XML format when user clicks submit on the HTML
page.
Thanks,
 
Hi All,
Does any one have idea of how to use JavScript in converting an HTML page on submit to a XML file(XML Format)
and save that file in there Local machine.
Thanks in advance.
 
You cannot do this with JavaScript alone. Go to the following web pages to see how to write files to the client machine.

Then, to write your form data you will need to build the the xml file yourself. For example:

var strFile = &quot;<?xml version=&quot;1.0&quot;?>&quot; +
&quot;<form>&quot; +
&quot;<data1>&quot; + document.form.data1.value +
&quot;</data1>&quot; +
&quot;</form>&quot;;

Then write the strFile using the functions for Netscape or IE.

Good luck,

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top