WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Include default text?

for

From: Steven Faulkner
Date: Oct 21, 2004 5:47PM


I agree derek, my example was incomplete....

with regards
steve

-----Original Message-----
From: feather [mailto: <EMAIL REMOVED> ]
Sent: Friday, 22 October 2004 9:08 AM
To: WebAIM Discussion List
Subject: Re: [WebAIM] Include default text?



On Thursday, October 21, 2004 5:42 PM, steven.faulkner wrote:
> If want to include default place holders, you can use
> JavaScript to clear a field of its default text on focus.
>
> Example:
> <input type="text" size="3" value="default text"
> onfocus="if(this.value=='default text'){this.value=''}" />

Of course, in non-JS capable browsers (like on my PDA for example), or where
JS is off, this default value will be a nuisance. If we are relying on JS to
clear it, perhaps we should use appropriate DOM methods to place the default
there instead, if and only if the JS is available? It would certainly be
more universal and you'd be able to be more confident that the JS could be
used properly to clear it out...

Just my 2 cents...

Best regards,
Derek.
--
Derek Featherstone <EMAIL REMOVED>
phone: 613.599.9784; toll-free: 1.866.932.4878 (North America)
Web Accessibility: http://www.wats.ca
Personal: http://www.boxofchocolates.ca

----
To subscribe or unsubscribe, visit http://www.webaim.org/discussion/