[thelist] php/ajax...

Christian Heilmann codepo8 at gmail.com
Mon Aug 7 14:51:06 CDT 2006


> hi chris...
>
> just playing around with it..
>
> i was thinking of a test app, where a user has two inputs 'a', 'b' and the
> app is able to automatically compute the sum and put the value into a 'c'
> field, or the user is able to hit a 'sum' button that performs the sumation
> without updating/modifying the rest of the form..

That is possible with JavaScript alone, but it means that users with
JavaScript disabled don't get anything. I'd make sure it works server
side and then use an obsubmit handler on the form to do this - simple
- computation in JavaScript to save server traffic.

Purely relying on JavaScript is just not clever.

-- 
Chris Heilmann
Book: http://www.beginningjavascript.com
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/



More information about the thelist mailing list