Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #12660

Re: on*= Clauses: When to return

Message-ID <2341534.6UFASCjf2k@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2012-03-13 23:10 +0100
Subject Re: on*= Clauses: When to return
Newsgroups comp.lang.javascript
References <a84al79rveq3549usk0q3et55uubgkmbu1@4ax.com> <86ef4e24-2765-4403-884f-18cce40028f1@d17g2000vba.googlegroups.com> <htdtl7tir8gr9e877ifjsmnhfdd7fqnsj7@4ax.com> <c39119be-4fef-4310-93e9-5eee6ea66a06@b18g2000vbz.googlegroups.com>
Followup-To comp.lang.javascript

Followups directed to: comp.lang.javascript

Show all headers | View raw


David Mark wrote:

> Gene Wirchenko wrote:
>> David Mark wrote:
>> > Gene Wirchenko wrote:
>> >> Dear JavaScripters:
>> >> 
>> >> In my working with on* clauses, one confusion I had was when to
>> >> return and when not to.  For example, with onblur, the return is
>> >> needed, as in:
>> >> <input name=Sample onblur="return SampleTest();">
>>
>> >What makes you think that's needed? And for what?
>>
>> I want to know when it is required, and when it is not.  I have
>> seen it used without differentiation as to when it is required.
> 
> Returning false prevents the default behavior for *some* events. When
> and why would you want to prevent a blur? ISTM that you can't any more
> than you can prevent the focus behavior. Those events are fired after
> the behavior has occurred.

For some event types, returning `true' does the same thing as returning 
`false' for others.  I had started detailing this at 
<https://developer.mozilla.org/en/DOM_Client_Object_Cross-
Reference/DOM_Events>.  Any good updates are welcome.


PointedEars
-- 
    realism:    HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness:    XHTML 1.1 as application/xhtml+xml
                                                    -- Bjoern Hoehrmann

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

on*= Clauses: When to return Gene Wirchenko <genew@ocis.net> - 2012-03-05 11:20 -0800
  Re: on*= Clauses: When to return "Mel Smith" <med_cutout_syntel@aol.com> - 2012-03-05 14:03 -0700
    Re: on*= Clauses: When to return Gene Wirchenko <genew@ocis.net> - 2012-03-05 15:11 -0800
      Re: on*= Clauses: When to return "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-06 12:15 +0000
      Re: on*= Clauses: When to return Dr J R Stockton <reply1210@merlyn.demon.co.uk> - 2012-03-06 19:06 +0000
  Re: on*= Clauses: When to return David Mark <dmark.cinsoft@gmail.com> - 2012-03-12 17:13 -0700
    Re: on*= Clauses: When to return Gene Wirchenko <genew@ocis.net> - 2012-03-12 19:58 -0700
      Re: on*= Clauses: When to return David Mark <dmark.cinsoft@gmail.com> - 2012-03-12 20:20 -0700
        Re: on*= Clauses: When to return Gene Wirchenko <genew@ocis.net> - 2012-03-12 22:15 -0700
          Re: on*= Clauses: When to return David Mark <dmark.cinsoft@gmail.com> - 2012-03-12 22:29 -0700
            Re: on*= Clauses: When to return Gene Wirchenko <genew@ocis.net> - 2012-03-13 08:56 -0700
              Re: on*= Clauses: When to return David Mark <dmark.cinsoft@gmail.com> - 2012-03-13 10:42 -0700
                Re: on*= Clauses: When to return Gene Wirchenko <genew@ocis.net> - 2012-03-13 12:53 -0700
                Re: on*= Clauses: When to return David Mark <dmark.cinsoft@gmail.com> - 2012-03-13 15:18 -0700
                Re: on*= Clauses: When to return Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-14 00:17 +0100
                Re: on*= Clauses: When to return Gene Wirchenko <genew@ocis.net> - 2012-03-13 19:48 -0700
                Re: on*= Clauses: When to return David Mark <dmark.cinsoft@gmail.com> - 2012-03-13 20:55 -0700
        Re: on*= Clauses: When to return Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-13 23:10 +0100

csiph-web