DOM Forms

I’ve been doing some research, thinking and testing on the subject of web forms recently. One of the things I have implemented in a CMS I co-develop (yeah I know, yet another CMS, dunno what to say) is to hide form elements until they are actually needed, based on input from the user. I use JavaScript to set the display property of elements or groups of elements. Well, I’m not the only one who’s been working on this. Over at Digital Web, there is an excellent article by Peter-Paul Koch that describes another, perhaps better, way of hiding and showing form elements. Technically I like his approach, but the use of custom attributes makes the XHTML invalid. Probably no big deal in this case, but I’d like to find some way of keeping it valid. Maybe by using classnames and checking the value of getAttribute(‘class’)? Hmm…

Posted on May 30, 2003 in JavaScript

Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.