- BRINGING IN SEPARATE PARAGRAPHS FROM WORD
- FOCUS YOUR ATTENTION RIGHT HERE
- WATCH OUT FOR KILLER OCTOTHORPES
- HEADING THIS WAY
- RESCALING AN IMAGE IN DREAMWEAVER
- QUICKLY CLEARING A PAG
- FINDING YOUR ASSETS IN A DARK ROOM (WITHOUT A FLASHLIGHT)
- EVERYBODY, COME ON AND DO DA COMBO, MON!
- CLOWNS TO THE LEFT OF ME, JOKERS TO THE RIGHT...
- ZIPPY FORM ORGANIZATION WITH THE FIELDSET TAG
- WHERE, OH, WHERE HAVE MY WINDOW SIZES GONE?
- STAYING IN GOOD FORM
- PLAYING NICE WITH THE INSERT BAR
- "A" IS FOR ACCESSIBLE APPLETS
- MULTIPLYING RADIO BUTTONS
- FANCY-SCHMANCY FORM BUTTONS
- LABEL-LICIOUS
- BUTTON, BUTTON, WHO'S GOT THE BUTTON?
- ANCHORS AWAY
- BYE, BYE HELPER TEXT
- THAT'S WHAT IT'S ALL ABOUT
- JAVASCRIPT REQUIRED
- TRANSFERING SITES
- NO MORE BROKEN LINKS
- REUSABLE JAVASCRIPT
- VIEW AS ROOT
- INITIALLY SELECTED VALUE
- REQUIRING INPUT
BYE, BYE HELPER TEXT
Sometimes it is necessary to have a form field already filled out so users understand what they are supposed to enter. The only problem with this method is that it means the users have to delete the pre-filled entry themselves, which can be annoyingespecially if there are many fields to clear. You can make it easier by clearing the text for them with some easy JavaScript. To clear an <input> tag's value, add the following:
You wouldn't want to clear the form every time the user clicks inside it because that could really get annoying. Let's clear the field only if the default value specified by the value attribute of the <input> tag is present, by using this code instead:
A great way to add this code is by first clicking on the field in Design view to select it, and then adding the value to the onFocus attribute in the Tag inspector.