[thelist] "return" in JS ... continued

Means, Eric D eric.d.means at boeing.com
Tue Jun 4 16:12:04 CDT 2002


>  -----Original Message-----
> From: 	Tom Dell'Aringa [mailto:pixelmech at yahoo.com]
> Sent:	Tuesday, June 04, 2002 4:07 PM
> To:	thelist at lists.evolt.org
> Subject:	RE: [thelist] "return" in JS ... continued
>
> Eric,
>
> Ok, again that makes sense and I see why you would do it. Now hopefully
this is my last question
> on this, but this script really got me thinking about all this. Here is
one more snippet, this is
> part of a larger onMouseDown script:
>
> <snip>
>
> Now, I can see on the return false - make sure you are pulling out of the
function like you said
> before the else and the last few brackets. But here, the author of this
script (not me) seems to
> be returning either a true or false value depending on whether a drag
object was selected. The
> caller of this script is document.onmousedown. Why would this event need a
true or false value? It
> seems on the surface it would not, and commenting out these lines seems to
have no effect on the
> drag working at all.
"If onMouseDown returns false, the default action (entering drag mode,
entering selection mode, or arming a link) is canceled."
>From here:
http://developer.netscape.com/docs/manuals/communicator/jsref/evnt14.htm



More information about the thelist mailing list