Re: This (Javascript) function has an onClick event that calls a function that calls This function
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 24 Oct 2006 10:13:07 +0200
"Bob Richardson" <bobr at whidbey dot com> wrote in message
news:uaGdndFAAeR1GaDYnZ2dnUVZ_vWdnZ2d@xxxxxxxxxxxxxxxxx
[...]
I'm sure you see the problem...prevmon(), in the onClick event, is
not defined prior to being mentioned in the onClick event. But what's
the solution?
The solution is that there is no problem. Javascript is an interpreted
language with very lazy semantics. Functions are not resolved ahead of
time, but only when they're actually called. At that time, the entire
source is scanned, so forward declarations aren't necessary.
Groetjes,
Maarten Wiltink
.
- Follow-Ups:
- References:
- Prev by Date: Re: This (Javascript) function has an onClick event that calls a function that calls This function
- Next by Date: How to get rid of constant color names for colordialog customcolors
- Previous by thread: Re: This (Javascript) function has an onClick event that calls a function that calls This function
- Next by thread: Re: This (Javascript) function has an onClick event that calls a function that calls This function
- Index(es):
Relevant Pages
|