login/register

Snip!t from collection of Alan Dix

see all channels for Alan Dix

Snip
summary

********************************************************...
* title  : Enchancing dd/mm/yyyy forms with unobtrusive ...
*
* story  : Two javascript functions to enchance interact ...
... ********************************************************

Code Examples -> Enchancing dd/mm/yyyy forms with unobtrusive javascript
http://www.weberdev.com/get_example-4279.html

Categories

/Channels/techie/JavaScript

[ go to category ]

For Snip

loading snip actions ...

For Page

loading url actions ...

Full snip

**************************************************************
* title  : Enchancing dd/mm/yyyy forms with unobtrusive javascript
*
* story  : Two javascript functions to enchance interaction with
*          HTML forms. The focusForm will focus to the first
*          input type='text' field which is not disabled.
*         
*          The applyDates function will draw dd, mm, and yyyy letters
*          in the appropriate fields. These will be erased on focus
*          and redraw again on blur and when the user hasn't
*          writen anything in them. It's pretty useful because
*          you dont have to explicitly state what goes in which
*          field with extra <label> elements on the markup.
*          So just have a class='dd' or class='mm' or class='yyyy'
*          in the fields you want this behaviour to be applied
*          and the rest will be done for you.
*         
*          Live demo @ http://temp.cherouvim.com/forums/ddmmyyyy
*         
* author : Ioannis Cherouvim
* web    : http://cherouvim.com
* date   : 2005-12-12
**************************************************************