Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #12429
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: on*= Clauses: When to return |
| From | "Evertjan." <exjxw.hannivoort@interxnl.net> |
| References | <a84al79rveq3549usk0q3et55uubgkmbu1@4ax.com> <9rko1iFs4qU1@mid.individual.net> <1vhal7hqn0kphr4enfge9pt5n8bcldcrbd@4ax.com> |
| Message-ID | <XnsA00E86EC38458eejj99@194.109.133.133> (permalink) |
| Date | 2012-03-06 12:15 +0000 |
Gene Wirchenko wrote on 06 mrt 2012 in comp.lang.javascript: > On Mon, 5 Mar 2012 14:03:42 -0700, "Mel Smith" > <med_cutout_syntel@aol.com> wrote: > >>Gene said: >> >>> return and when not to. For example, with onblur, the return is >>> needed, as in: >>> <input name=Sample onblur="return SampleTest();"> >> >> I don't see anywhere in my 'Bible' that the onblur requires a >> return >>(either true or false). >> >> (But perhaps *you* need a return for you own requirements ?? ) > > How can I tell is the problem. I am fine with ignoring return > values if I do not need them. Wrong conclusion. Return values do not ask you if you need them. > I would like to know if they are > available, and if they are, what they mean. That data is sadly > lacking where I have been looking. Effectively there always is a return value. [unless the javascript gives an error, perhaps?] If there is no return value then true is defaultly assumed. ONLY a return false acts the prohibit the normal html-action. Since losing focus has no default html-action, the onblurr return value is not used. [same for onfocus] With onclick and onsubmit, however, have prohitable default actions: <a href='..' onclick='return false'>click me and nothing happens</a> <form onsubmit='return false'> <input type='submit' value='click me and no submission will be done'> </form> -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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