On Mon, Jan 26, 2009 at 2:05 PM, Michael Kubler
<greyphoenixproducti...@gmail.com> wrote:
> I like the idea of not updating the content straight away (as the user might
> not want to see it updated), but depending on the situation I would
> personally make the submit button look grey and inactive unless they've
> changed something in which case it'll be normal and (black).
> Although actually making it inactive could be bad as the javascript might
> not correctly update it's status to active, preventing the customer from
> actually submitting the data they've just painstakingly entered. The whole
> progressive enhancement/graceful degradation thing.
>
> However, on the other hand to having it not automatically update, the thing
> that I hate the most on a website is when it looses valid data that I've
> entered (clicked, selected, whatever), which is where saving the current
> state using Ajax can be useful, although probably over the top for most
> things anyway.
>
> Ohh btw Tedd, the problem with your implementation is that as a user, if I
> change some settings, but want them back, when I set it back to say C 5 as I
> had it before, the button is still Red, and I could get confuzled about what
> I'd previously entered. Obviously having a reset button would fix that, (as
> long as it set the submit text back to normal), or you could get PHP to set
> the javascript to check if the values are as they were before and set the
> button back. Obviously a lot more javascript than the 3 lines of code you've
> got there, for only a minor usability point, especially if the users
> previous selection is listed next to the actual buttons, but it's at least
> something to be aware of.
>
>
> My 2c.
>
> Michael Kubler
> *G*rey *P*hoenix *P*roductions <http://www.greyphoenix.biz>
>
>
>
> Nitsan Bin-Nun wrote:
>>
>> Since you are using JS why not just update the content straight away?
>> (ajax/etc)
>>
>> On Sun, Jan 25, 2009 at 7:55 PM, tedd <tedd.sperl...@gmail.com> wrote:
>>
>>
>>>
>>> Hi gang:
>>>
>>> I had a problem and solved it -- here's the write-up:
>>>
>>> http://www.webbytedd.com/b/update-select/index.php
>>>
>>> What do you think of the solution?
>>>
>>> Cheers,
>>>
>>> tedd
>>> -------
>>> http://sperling.com  http://ancientstones.com  http://earthstones.com
>

This is veering away from PHP and into JavaScript, but there are
defaultValue (for text and textarea) and defaultSelected (for lists)
properties available on form fields in JavaScript so you don't even
have to store the previous value in variables. I'm not sure how they
are as far as degrading gracefully, but they have been around for a
while now and have worked for my purposes any time I've used them.

Andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to