"Jukka K. Korpela" wrote:
Philip Ronan <in*****@invali d.invalid> wrote:
"Jukka K. Korpela" wrote:
It is wrong because it relies on security holes in browsers (it
does not work if the browser has client-side scripting disabled),
for doing something that need not be done at all.
Get real. This has nothing to do with security holes.
You never heard of such holes? Not very real.
OK please explain what's so insecure about using Javascript to clear the
initial contents of a search box.
If Javascript is disabled, then the user can delete it with a
single keypress.
Can he? Are you sure?
OK, I have to admit I haven't tested this functionality in every single
browser. I've got better things to do, as it happens. But from my experience
most browsers select the contents of text boxes when they receive focus. If
not, then the user just has to hold the key down a bit longer until the
auto-repeat kicks in. Or if the user is really pressed for time, perhaps
control+delete might do it, or (gasp) control-A, delete. This isn't really a
big deal.
So what's the problem?
There was no problem before someone created it by using a default entry
that ain't no default entry but just an annoyance.
An annoyance to you perhaps, but you seem to be the sort of person that gets
annoyed very easily.
Spare us the dogma, please!!
Did you have something to say about HTML authoring for the WWW?
Sure. If you want to add a search box to your web pages but you don't have
much space available, here's something you could try: Create a form with a
single INPUT box containing "Search" as the initial text. That way you can
indicate the purpose of the search box without cluttering your design with
additional LABEL or LEGEND elements. You can even use Javascript to clear
this initial text when the text box receives the focus. Just don't tell
anyone at c.i.w.a.h what you've done.
Will that do?
--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/