July 9, 2004

Trimming Form Fields

Andy Clarke has a very neat form trick he'd like to show you. It's a great trick guaranteed to irk your Marketing folks. It's about hiding non-essential form fields on-the-fly. And it's great stuff. I mean just go look at the demo. It's fun, and boy does it make that form so much more inviting. Simon Willison saw this, and saw some possibilities. Actually he made the script a little more effective. Rather than cycling through all the divs, he just toggles the class of those elements. Now, most place, this form effect will irrate your Marketing department to no end. (which isn't a bad thing, really.) But imagine this for a registration form, one that you will probably go back and fill at a later time. This becomes valuable. There are defintely some applications here that I want to try out. Very nice stuff.
Post Info

Tagged As Coding

Comments are Open (1)

Posted at 12:10 PM

Comments

Ahmed

Yes, the trick to change the class, or CSS of a class instead of cycling through elements is very handy.

In the comany i worket at before they used to cycle through a whole table of thoughtands of entries to filter things out and that proved to be a killer on slow systems. I suggested they try directly manipulating the CSS content of the defined class (something i had never tried before, but came up with on the fly) and man did it work.

Its something very few people know about. I think Peter Paul Koch had very good info on this on his JS page.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Search
Comments on this post
Categories
Info
Tony Stephens
Copyright © 1995-2005
Site Version:
10
Licensed:
Creative Commons
Validate:
XHTML, CSS, 508, RSS
Subscribe
Blog-Fu, Link-Fu