Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #28256
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: How to do a popup box |
| Date | 2015-07-02 20:30 +0100 |
| Message-ID | <020720152030548877%timstreater@greenbee.net> (permalink) |
| References | <41326d5d-0202-44e4-911b-6474f8f89bc8@googlegroups.com> <e938961f-d229-4860-aa49-8c8d2c87ed88@googlegroups.com> <mmj9fl$p7i$1@dont-email.me> <87r3oygtgi.fsf@bsb.me.uk> <cc310794-5505-4381-9060-cea00db8bd50@googlegroups.com> |
In article <cc310794-5505-4381-9060-cea00db8bd50@googlegroups.com>, <bit-naughty@hotmail.com> wrote: >On Saturday, June 27, 2015 at 12:58:37 AM UTC+5:30, Ben Bacarisse wrote: >OK, I'm trying to understand this *without* opening my JS book, >1) Can you please explain the function (evt) stuff? Like if you define a >function that way, it'll automatically call the function with an argument of >the "event" (which will be an object), the properties of which you can access >with evt.clientY and X? Is that what's going on? Yeah, roughly. But see below. >2) What is evt.stopPropagation() ? When an event happens (e.g., click on a table cell), you can have a handler on the cell which handles the event. But the event propagates up and down so that the row that the cell is in gets gets the event too, and so on up to the body. If you have click handlers there, they will also get called. If you want to stop that happening, you need to call evt.stopPropagation() in the last handler that you want to have deal with the event, and it won't propagate any further. The above is incomplete and slightly erroneous, but good enough for this explanation. My advice is indeed to delve into your JS books, and read up on the various event models, and event propagation/bubbling, to see more detail and to understand better. My books are JavaScript: The definitive guide by David Flanagan, and the JavaScript Bible 7th Edition (Goodman et al). All editions of both books are out of date before they are even purchased (I'm on my second version of Flanagan and third of Goodman) so you have to be a bit careful, but by and large they'll do and they go into some detail about a large number of things. Expect to replace books with newer editions on a regular basis. People here will argue the toss all day about this or that author being a fool and incompetent, I'd say go on Amazon and Read Inside various books to see which authors have writing styles that suit you and screw the wise guys. -- "Once you adopt the unix paradigm, the variants cease to be a problem - you bitch, of course, but that's because bitching is fun, unlike M$ OS's, where bitching is required to keep your head from exploding." - S Stremler in afc
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to do a popup box bit-naughty@hotmail.com - 2015-06-25 12:18 -0700
Re: How to do a popup box "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-06-25 21:29 +0200
Re: How to do a popup box Scott Sauyet <scott.sauyet@gmail.com> - 2015-06-25 13:02 -0700
Re: How to do a popup box "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-06-25 22:10 +0200
Re: How to do a popup box "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-06-25 22:05 +0200
Re: How to do a popup box Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-25 22:18 +0200
Re: How to do a popup box "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-06-25 22:25 +0200
Re: How to do a popup box bit-naughty@hotmail.com - 2015-06-25 22:55 -0700
Re: How to do a popup box "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-06-26 09:14 +0200
Re: How to do a popup box bit-naughty@hotmail.com - 2015-06-25 22:54 -0700
Re: How to do a popup box Gregor Kofler <usenet@gregorkofler.com> - 2015-06-26 12:29 +0200
Re: How to do a popup box Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-26 20:28 +0100
Re: How to do a popup box bit-naughty@hotmail.com - 2015-07-02 11:14 -0700
Re: How to do a popup box Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-07-02 20:13 +0100
Re: How to do a popup box Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-05 10:48 +0200
Re: How to do a popup box Tim Streater <timstreater@greenbee.net> - 2015-07-02 20:30 +0100
Re: How to do a popup box Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-26 11:34 +0100
Re: How to do a popup box bit-naughty@hotmail.com - 2015-06-26 12:36 -0700
Re: How to do a popup box "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-06-26 21:58 +0200
Re: How to do a popup box bit-naughty@hotmail.com - 2015-07-02 11:06 -0700
Re: How to do a popup box "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-07-02 22:01 +0200
Re: How to do a popup box Tim Streater <timstreater@greenbee.net> - 2015-06-26 22:32 +0100
Re: How to do a popup box "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-27 01:41 +0200
Re: How to do a popup box Tim Streater <timstreater@greenbee.net> - 2015-06-27 08:51 +0100
Re: How to do a popup box "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-06-27 09:57 +0200
Re: How to do a popup box Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-06-29 15:39 +0200
Re: How to do a popup box bit-naughty@hotmail.com - 2015-07-02 11:08 -0700
Re: How to do a popup box "Leonardo Azpurua" <leonardo@exmvps.org> - 2015-06-30 12:32 -0430
Re: How to do a popup box bit-naughty@hotmail.com - 2015-07-02 11:16 -0700
csiph-web