Click here to Skip to main content
15,896,453 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I am currently having a long questionnaire in the form of pages which I need the user to fill to complete their application.I want to provide a facility where the user saves the answers on each page and then due to unforeseen circumstances logs out.When he logs into the questionnaire again I want his data stored and his questionnaire should load from the point where he stopped.

I need to find ways and alternatives to implement this.Any advice and pointers would be very helpful.

Ananth
Posted

1 solution

Well, create a table or may be multiple table. on every 'save click' save all the data available as inputted. when he finally finish his inputting send all the data to the original table.
another solution (same but with different way):
You can also create a simple table with userid and a text field. when user create a save button create a simple URI and save the URI in the database. so, all you need is two column in the table. when user log in back just read the saved text from database and parse with parse_url function and recreate the page with the related value.
 
Share this answer
 
Comments
Ananth Ramchandran 14-Sep-12 1:00am    
Thanks Mohibur.I thin you are misunderstanding my question.I am still in the high level design of an application which used save and resume tactic.I wanted to know the many ways to implement it so that I can decide in one way which is compatible with the application.THe application is just a Q&A page.
Mohibur Rashid 14-Sep-12 2:03am    
if you didnt understand what I said. then you are still a beginner. learn more..
Ananth Ramchandran 18-Sep-12 22:44pm    
I understood very clearly the 2 ways you were outlining.But what I meant to ask in my question was.A customer is providing answers to questions on multiple pages.After every page, data on that page is stored in the database by means of a database save.But for abandoned interviews due to closing the browser,time out,lost connection and logout, is there a way to save the data provided by customer on the page where the application was exited out.So that when they return they would be displayed exactly where they left off.We could use Gemfire to do implicit save after every question is answered but I wanted any other alternatives to achieve this.Anyways thanks for your response.
Mohibur Rashid 18-Sep-12 22:53pm    
There is few issue you will have to consider:
1. If the application is killed then you cant do anything about it.
2. If power failure occurred you cant do anything about it.
But when user intentionally want to close window you can call

window.onbeforeunload function to save your inputted data to the server.


Time out issue can be resolved by javascirpt. You can save all the changes in the server after every change is made.

You can also use a timer that will save the entire page into server after every certain duration.

there might be better ways....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900