SitePoint Sponsor

User Tag List

Results 1 to 13 of 13

Hybrid View

  1. #1
    ********* Articles ArticleBot's Avatar
    Join Date
    Apr 2001
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Article Discussion

    This is an article discussion thread for discussing the SitePoint article, "Simple Tricks for More Usable Forms"

  2. #2
    . gdape's Avatar
    Join Date
    Jan 2002
    Location
    in the outskirts, and in the fringes
    Posts
    501
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice, and the working example at the end is great for us who skim and hack

  3. #3
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm that wasn't too hard :-)
    Here is the code addition to alter the label text:
    function oninputfocus(e) {
    /* Cookie-cutter code to find the source of the event */
    [...cut...]
    /* End cookie-cutter code */
    var id = source.id;
    var label = getLabelForId(id);
    label.style.fontWeight='bold';

    source.style.border='2px Solid #711F5E';
    source.style.margin='0';
    }
    function oninputblur(e) {
    /* Cookie-cutter code to find the source of the event */
    [...cut...]
    /* End cookie-cutter code */
    var id = source.id;
    var label = getLabelForId(id);
    label.style.fontWeight='normal';

    source.style.border='1px Solid #711F5E';
    source.style.margin='1px 0';
    }

    Hope it's usefull! It was for me :-)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •