Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-17-2012, 07:41 PM   PM User | #1
spudmonkee
New Coder

 
Join Date: Sep 2012
Posts: 16
Thanks: 4
Thanked 0 Times in 0 Posts
spudmonkee is an unknown quantity at this point
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 .
spudmonkee is offline   Reply With Quote
Old 12-17-2012, 07:53 PM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,162
Thanks: 59
Thanked 3,992 Times in 3,961 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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.
Old Pedant is offline   Reply With Quote
Old 12-17-2012, 07:56 PM   PM User | #3
spudmonkee
New Coder

 
Join Date: Sep 2012
Posts: 16
Thanks: 4
Thanked 0 Times in 0 Posts
spudmonkee is an unknown quantity at this point
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 .
spudmonkee is offline   Reply With Quote
Old 12-17-2012, 08:32 PM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,162
Thanks: 59
Thanked 3,992 Times in 3,961 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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.
Old Pedant is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:25 PM.


Advertisement
Log in to turn off these ads.