PDA

View Full Version : Saving user information to XML document using javascript



vijaypawar2007
09-04-2008, 12:01 PM
Hi,
I want some help about the contact us page. Please help me out. Ineed to save the user information when user visits the contact us page.I want the coding for saving the information to XML file usingJavaScript. Can anybody help me, please?
Thanks.

Regards,
Vijay Pawar

codeexploiter
09-04-2008, 12:12 PM
The file operations through JavaScript works only in IE but again as far as a website is concerned this approach is not efficient as the clients has to download the file into their machines in order to do the file operations.

I would suggest using AJAX or normal HTTP methods for sending the information based on which you want to construct the XML file to the server-side. Use your server-side tool (PHP, ASP.NET, Java, etc) for creating/maintaining the files.

vijaypawar2007
09-04-2008, 01:16 PM
Hi,
Thanks for reply. But I don't have the licenses of these (ASP.NET, AJAX). I don't have any idea about Java, PHP. If you have another option with JavaScript, then please tell me how to do with JavaScript. And if you have simple coding for contact us form, then you reply me. My requirement is that I have 6-7 fields in contact us form through which I have to reply the visitor's e-mail address. So please help me with it.
Thanks.

codeexploiter
09-05-2008, 03:18 AM
If your web host support any of the server-side tools then you'll be able to do. ASP.NET/AJAX/PHP these things are free for you if your web host supports it. Please confirm with your web host support their server-side tool support.

As I've mentioned earlier using JavaScript alone you might not be able to achieve the result in cross-browser manner.

vijaypawar2007
09-05-2008, 12:57 PM
Hi,
Can anybody give me the coding for contact us page and the code for redirected page in javascript. Because I want that information in my website's folder and want to reply those visitors after visiting the contact us page in my web site.
Thank you.

magicyte
09-05-2008, 09:19 PM
Here. These links will teach you XML and AJAX. - That is, how to parse it and other really cool things. I also swear that there was a script that this guy posted about saving things to text documents, html documents, you name it with ActiveX controls.

These tutorials that are given are VERY easy to understand, also providing info for the total NON-PROGRAMMER!!

Here are the links:

W3SCHOOLS - the website (http://www.w3schools.com/)
XML Tutorial (http://www.w3schools.com/xml/default.asp)
AJAX Tutorial (http://www.w3schools.com/ajax/default.asp)

Hope this helps.

-magicyte