From: | Neil Bothwick |
Date: | 13 Mar 2001 at 15:59:26 |
Subject: | Re: Javascript Does'nt work on my amiga ??? |
Matt Sealey said,
> Hello Neil
>>> Everything between <H2> and </H2> is an area on the screen, more
>>> to the point a peice of text so high and so bold. You can move your
>>> mouse over it. If you click the text, you HAVE CLICKED IT. It's clickable.
>>
>> I know you *can* click on it. but if it's not an obviously clickable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> link, why would a user think to click on it. I don't go round clicking
>> every piece of text on every web page, just in case some lame "webmaster"
>> has added an onClick handler. If you want someone to use a link, make it
>> a link.
> What's this about links being the only thing you can click?
I've no idea. You said it, I didn't.
> Besides, clicking on stuff is useful sometimes. I have a clock somewhere
> on one of my sites that ticks away using some neat Javascript. Clicking
> on the text stops the clock. Or, if you set a cookie earlier, starts it up
> from localtime. Okay, so I'm using SPAN, but the same thing applies
> since Hn is essentially a subclass of SPAN - with specific formatting and
> an implied linefeed.
Of course clicking on stuff is useful, but that doesn't mean you should
infest basic text with onClick handlers and chunks of JavaScript when a
simply <A> tag will do the job. There is a great deal of difference
between a clock and a heading.
> As it happens, the real use in stuff like this is onMouseOver or the like,
> so if you hover over plain old text you can do something snazzy. onClick
> is probably just for completeness.
I agree. I'm not saying it shouldn't be there, it *is* in the W3C spec
after all, just that it's a daft way of doing things in this instance.
>>> Tough titties, but you wouldn't be visiting Nick's site anyway :O
>> It wouldn't matter, as he didn't have an onClick handler. He had an
>> uncalled function with a name that looked like an object's method :-O
> But what he did was a PERFECTLY valid way of attaching a handler to
> an object. Or at least I remember it to be..
According to my JavaScript book, the only valid ways to define an event
handler are in the HTML tag itself or using the <SCRIPT FOR="name"
EVENT="onclick"> construct. Maybe I'm not up to to date on the latest
standards from Redmond...
Neil
------------------------ Yahoo! Groups Sponsor ---------------------~-~>
Make good on the promise you made at graduation to keep
in touch. Classmates.com has over 14 million registered
high school alumni--chances are you'll find your friends!
http://us.click.yahoo.com/l3joGB/DMUCAA/4ihDAA/d8AVlB/TM
---------------------------------------------------------------------_->
Quote carefully and read all ADMIN:README mails
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/