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.
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.
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.
Posted by: Ahmed | July 10, 2004 07:18 PM