Re: Dirty Button

From: Date: Sun, 25 Jan 2009 21:11:49 +0000
Subject: Re: Dirty Button
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-287120@lists.php.net to get a copy of this message
On Sun, 2009-01-25 at 13:49 -0500, tedd wrote: > At 1:18 PM -0500 1/25/09, tedd wrote: > >At 1:02 PM -0500 1/25/09, Robert Cummings wrote: > >>Dirty button is all fine and dandy, but since you're using JavaScript to > >>update the button's CSS (or colour), then why not update the information > >>similarly so that the information is up to date? > >> > >>Cheers, > >>Rob. > > Rob: > > Now I remember why I didn't do that. > > The demo I provided was a stripped down version of a problem I was > trying to solve where the user's selection was tied to a trip to the > server to pull data from a database. > > The trip to the database should be done only after the user selects > ALL the control values they are interested in. > > True, I could use AJAX to trigger a php slave script to get the data > from the dB and throw it back to the page in real time, but that > might be premature depending upon what the user really wanted to do. > > For example, if the user selected something from two, or more, > selection controls but didn't want to see the results until they were > finished thereby clicked the "Submit" button. Otherwise, it might > annoy them to have the data change with every change in the selection > controls. That's the problem I faced and thus the solution I came up > with was the "Dirty Button". > > My madness makes sense to me now. Queue the ajax requests so that no more than one per 2 or 3 seconds occurs (if change has occurred) so they are not so frequent, then also perform an on-demand update when submit is hit. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP

« previous php.general (#287120) next »