[Javascript] Returning a Question
Scott Moore
moore.scott at gmail.com
Thu Aug 11 13:53:27 CDT 2005
Just as an FYI, the article I was working off and that outlined the
original code is here http://www.alistapart.com/articles/
imagegallery/. However, I didn't see that the author specifically
explained the use of return(showPic(this).
On Aug 11, 2005, at 1:57 PM, Triche Osborne wrote:
Scott's problem and its solution reminded me of a question I've been
wanting to ask re: the following:
<a onclick="return(showPic(this))" href="image.jpg" />
What, exactly, is return doing in this instance? The function has no
explicit return value, so I'm guessing this returns a Boolean? If so,
why does this cancel the normal behavior (link that opens with the
href value)? If not, what is being returned and why does it cancel
normal behavior?
None of my JS references explains the use (or not) of return in
a function call when there is no explicit value to be returned. (They
use it sometimes, but don't explain *why*.)
Triche
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list