Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    writing to database partial survey form

    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.
    Last edited by chelentano; 01-28-2003 at 07:28 PM.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Northern NJ
    Posts
    404
    Thanks
    0
    Thanked 1 Time in 1 Post
    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?
    I would rather be a lion for a day than a lamb that lives forever.

  • #3
    New Coder
    Join Date
    Jul 2002
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •