|
Posted by Alexey Kulentsov on 09/10/05 01:47
David wrote:
> I have a web app that is forms intensive. These forms have a number
> of dropdown lists, check box, etc., each which requires additional
> processing, db calls, etc. On an item changed, I post back the form
> and set a hidden field to tell PHP what changed so it knows what to
> process.
When processing form on server just compare entered data and current
data from database to know that is changed. I use class for it who make
'changed' attribute for every db field so I can just check attribute.
> Is there a preferred way to handle this type of forms processing? My
> screen is a mix of hidden vars., Javascript, etc. which works but it
> messy!
All javascript code must be in one separate .js file. just link to it
on your form page and call procedure with one long-long parameter
describing all tests for this form. as here for example:
http://www.crimaniak.com/flat/
(see source, search for <form> tag)
Navigation:
[Reply to this message]
|