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
    Sep 2012
    Posts
    16
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question Saved text box system

    Hey guys,

    I'm trying to make a form with around forty-five separate text fields (quick draft below) and I need some help in regards to saving the entries.

    Basically I need it to record text entered and display it as the value of the text area. E.G. I type "example" into a box, hit save, refresh the page and see "example" in the text box it was previously entered in.



    Any help would be much appreciated, thanks .

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,561
    Thanks
    80
    Thanked 4,494 Times in 4,458 Posts
    And what if somebody types something into three different boxes and then clicks SAVE on only one of them?

    Do you expect all 3 to be saved? Or only the one clicked on?

    Have you considered doing this via AJAX, so that the user does not *HAVE* to refresh the page? That way only the one(s) clicked on are saved but other changes are not (yet) lost.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    New Coder
    Join Date
    Sep 2012
    Posts
    16
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    And what if somebody types something into three different boxes and then clicks SAVE on only one of them?

    Do you expect all 3 to be saved? Or only the one clicked on?
    It would only save that particular entry which corresponds with the button.

    Quote Originally Posted by Old Pedant View Post
    Have you considered doing this via AJAX, so that the user does not *HAVE* to refresh the page? That way only the one(s) clicked on are saved but other changes are not (yet) lost.
    I'll look it up, thanks .

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,561
    Thanks
    80
    Thanked 4,494 Times in 4,458 Posts
    I really think AJAX may be your best answer.

    You could perhaps change the background color of an answer once it is saved (and change it back if the player changes it again, until it is saved again).

    This would not be hard to implement. Each button would simply send the corresponding answer to the server and change the background to indicate it had been sent.

    Question: Is this on a per-person basis? That is, does each person have his/her own set of 45 answers?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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