[Javascript] Returning a Question
Triche Osborne
wdlists at triche-osborne.com
Thu Aug 11 13:57:30 CDT 2005
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
More information about the Javascript
mailing list