I have a test generator that students take test with. It puts the questions in a list format and they answer each. The problem is if they get disconnected from the network and hit submit they lose all their work.

Maybe, save each question as its answered through an asynchronous call somehow? store them locally somehow? Suggestions on a good approach?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The asynchronous call idea is a great one if you can work it out. Here's an article that may come in handy for that.

Otherwise there's always the old page refresh every time they answer a question. You could handle the ugly aesthetics of that concept by doing 1 question per page with a next button.

I used to work at a company that wrote LMS's (learning management systems) for large companies and if I remember correctly, we wrote all of our tests one question per page.
YOu've got the Asynch idea right but CF event gateways aren't meant to do this kind of thing.

"ColdFusion event gateways are ColdFusion elements that let ColdFusion react to or generate external events or messages in an asynchronous manner. Event gateways let a ColdFusion application handle information that does not come through an HTTP request. For example, you can use event gateways to handle instant messages, short messages from mobile devices, or messages sent to a TCP/IP port."

What you need is basic AJAX (asynchronous JavaScript and XML) -

When a user answers a question, use JS to fire off a GET to a CFC with URL variables including the testid, userid, questionid  and answerID  to the server. This all happens behind the scenes (thus asynch).

There a tons of different ways to use & call ajax  and all the cool kids are doing it (it's web 2.0!)


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.