From: SteveYoungGoogle on
On Jun 9, 6:04 pm, David Mark <dmark.cins...(a)gmail.com> wrote:
<snip>
> You are mixing and matching DOM's.  Forget returning false unless you
> are using DOM0.

Could you please elaborate on what you mean by this? I tried the OP's
code with "return false" in the three event handlers Mouseup,
Mousedown and Mousemove and it worked perfectly in Firefox 3.5 and IE6
(on Wine).

This is a genuine attempt to learn something and therefore it would be
appreciated if you could turn off the sarcasm for a short time.

Regards, Steve.
From: Richard Cornford on
On Jun 10, 9:21 am, SteveYoungGoogle wrote:
> On Jun 9, 6:04 pm, David Mark wrote:
> <snip>
>> You are mixing and matching DOM's. Forget returning false
>> unless you are using DOM0.
>
> Could you please elaborate on what you mean by this? I tried
> the OP's code with "return false" in the three event handlers
> Mouseup, Mousedown and Mousemove and it worked perfectly in
> Firefox 3.5 and IE6 (on Wine).
<snip>

Aren't you making the point here? Where - return false; - ever works
to cancel a default action it works everywhere, and there is no need
to involve - preventDefault - calls. That is, if using 'DOM 0' event
handling is viable then it is all that is needed.

Unless you mean that you tried code with both - return false; - and -
preventDefault - calls, in which case you should not take "worked
perfectly" as indicative of correctness. It is possible to add any
number of redundant and pointless actions to code that already "worked
perfectly" without stopping it from working, and then the observation
that it still "worked perfectly" would not justify the redundant and
pointless actions added to the original.

Richard.
From: David Mark on
On Jun 10, 4:21 am, SteveYoungGoogle <stephen.jo...(a)googlemail.com>
wrote:
> On Jun 9, 6:04 pm, David Mark <dmark.cins...(a)gmail.com> wrote:
> <snip>
>
> > You are mixing and matching DOM's.  Forget returning false unless you
> > are using DOM0.
>
> Could you please elaborate on what you mean by this? I tried the OP's
> code with "return false" in the three event handlers Mouseup,
> Mousedown and Mousemove and it worked perfectly in Firefox 3.5 and IE6
> (on Wine).

And which has more weight, observations of "perfection" (as seen in
such classics as jQuery unit tests, SlickSpeed, etc.) or
understanding? It's the same lesson over and over. Do not program by
observation. If the only justification you have for a line of code is
your observation that it "works perfectly" in whatever browsers you
have on hand, you have no justification at all.

Furthermore, did I say that returning false could not work?

>
> This is a genuine attempt to learn something and therefore it would be
> appreciated if you could turn off the sarcasm for a short time.
>

What sarcasm? Perhaps you should have a native English speaker read
this thread back to you. :)

Next time you want help, leave off the random insult.
From: SteveYoungGoogle on
On Jun 10, 12:28 pm, Richard Cornford <Rich...(a)litotes.demon.co.uk>
wrote:
> On Jun 10, 9:21 am, SteveYoungGoogle wrote:> On Jun 9, 6:04 pm, David Mark wrote:
> > <snip>
> >> You are mixing and matching DOM's.  Forget returning false
> >> unless you are using DOM0.
>
> > Could you please elaborate on what you mean by this? I tried
> > the OP's code with "return false" in the three event handlers
> > Mouseup, Mousedown and Mousemove and it worked perfectly in
> > Firefox 3.5 and IE6 (on Wine).
>
> <snip>
>
> Aren't you making the point here? Where - return false; - ever works
> to cancel a default action it works everywhere, and there is no need
> to involve - preventDefault - calls. That is, if using 'DOM 0' event
> handling is viable then it is all that is needed.
>
> Unless you mean that you tried code with both - return false; -  and -
> preventDefault - calls, in which case you should not take "worked
> perfectly" as indicative of correctness. It is possible to add any
> number of redundant and pointless actions to code that already "worked
> perfectly" without stopping it from working, and then the observation
> that it still "worked perfectly" would not justify the redundant and
> pointless actions added to the original.
>
> Richard.

I see now, thanks for the explanation. I did only use "return false"
but David's comment confused me. My bad.

Steve.
First  |  Prev  | 
Pages: 1 2
Prev: Alt text for equations
Next: qooxlisp live