[whatwg] Comments on Web Forms 2.0

>>>But coding each of these things in Javascript is challenging -- it
>>>requires extensive testing, and it's common that the result won't be 
>>>extensible, robust, or sufficiently general.
>>
>>
>>Sure, but it's not *that* difficult.
>
>Sure.  But *I* don't want to do it for each project.  I don't think we 
>actually disagree -- I'm just saying that a lot of these DHTML tricks 
>(server side programmers tend to see these as tricks, at least) aren't as 
>widely used because of the difficulty of implementing and maintaining them.

Why would you need to rewrite the script for each project? What I have in 
mind is ONE single script that validates a form according to the Web Forms 
spec, though if you really wish you could rewrite the validation functions.

Insert script in page header, make sure your form is Web Forms compliant 
(with probably a few extra caveats and tricky bits due to today's browser 
compatibility patterns) and it works.

As to DHTML, it has been badly misused and many, many scripts are written by 
people who don't know as much about JavaScript as they think they know.

Besides, form validation is defintely NOT DHTML, since it doesn't change any 
styles (except maybe of invalid form fields, but even that's not required). 
It's common Level 0 DOM scripting for the actual validation, combined with a 
bit of high-brow Level 1 DOM scripting for finding out what you should 
validate against and inserting the error messages.

Forget sliding layers, custom scrollbars and all that ancient DHTML crap. 
These scripts are based on new principles.

-------------------------------------------------------------------
ppk, freelance web developer
Interaction, copywriting, JavaScript, integration
http://www.quirksmode.org/
Column "Keep it Simple": http://www.digital-web.com/types/keep_it_simple/
------------------------------------------------------------------

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee? 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

Received on Thursday, 10 June 2004 11:22:58 UTC