View Full Version : writing to databese partial survey form
01-28-2003, 07:02 PM
I have a form with multiple choice questions - radio buttons. Usualy when all questions answered the data is written to database via submit button - it's a typical thing.
But is it possible to write already entered responces to another database while each individual question answered while user makes click on each radio button ?
Any thoughts would be appreciated.
01-28-2003, 07:14 PM
I have never done this but I think you would submit the form data onblur or onfocus of the radio button. This will I believe refresh the page each time but you can refresh back to the form so that none of the data is lost each time.
:S did I make sense?
01-28-2003, 07:33 PM
Thank you Ecnarongi
but the data saved from radio buttons should be saved into a separate temp database - different from the main one, when user clicks submit button. The purpose of this would be to save responces in case power is interrupted or something
01-29-2003, 02:32 AM
In this case, I would use logic to determine whether ALL of the required fields have been filled out, each time the form is submitted.
If not, write to the temporary (incomplete) table.
If so, write to the main (complete) table.
Of course, you could also keep all of this information in one table, and every time the form submits, write all of the available information into the table. In this case you'd have some field named "COMPLETE" or something of the sort, with a 0 or 1 value (bit) or "Y" or "N" value (char).
The way you're describing it though, you'd have to submit the form each time someone clicked a radio button, instead of actually submitting the form. With classic ASP, I wouldn't bother - although that might be a bit easier if you're familiar with .NET.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.