aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Saving form data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Saving form data" Watch "Saving form data" New topic
Author

Saving form data

Timo Tamme
Greenhorn

Joined: Nov 10, 2011
Posts: 8
Hello!
I am quite new at HTML and JavaScript and I make web page, where users can insert some data.
So I have done HTML page, where user can insert different values, but form continues in separate pages. So I have problem that I want to save form data before submitting it. Is this even possible by using JavaScript?
In my dreams the ideal solution would work with saving data to XML and if user is going to previous page of form, it will be initialized from XML by using JavaScript.
Can you give me some ideas / hints to make this solution?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18651
    
    8

The usual way to do that is to store the partial data on the server; when the first page is submitted the server code saves the form data in the user's session and responds by displaying the second page, and so on.

Javascript data is pretty much restricted to one page, and when the page is unloaded its data goes away. There are some mechanisms for storing persistent data in Javascript, of which cookies are the most widely-supported, so if you're really keen on using Javascript instead of the standard server code then look into those.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Saving form data