[Chameleon] GetJavascriptInitFunctions question
Paul Spencer
pspencer at dmsolutions.ca
Sun Feb 12 09:07:42 EST 2006
Hi,
close but not quite. Each set of functions has a separate purpose.
OnLoad functions are inserted into the the onload function. Init
functions are added to a script tag at the end of the page. The
difference is that the init functions are executed while the page is
being loaded and onload is executed after it is loaded. This
distinction probably isn't necessary with modern browsers but it was
when we supported nn4.79 because there was no document.createElement
GetJavascriptFunctions returns functions that are to be put into the
main javascript block ... these are available to be called by code in
onload and init.
This whole thing should be cleaned up as the javascript architecture
is really an ancient hack to make chameleon work in browsers like
nn4.79 ... and since that's not really a requirement any more, it
could be changed substantially to simplify. Unfortunately, that's
not a simple job so its not likely to happen soon :(
Cheers
Paul
On 12-Feb-06, at 8:08 AM, Yahya wrote:
> Hi,
> I'm trying to create a custom widget and am having some difficulty
> figuring
> out how the widgets use javascript. The way I understood it so far
> is that
> the GetJavascriptxxxxfunctions list the functions to be called for
> xxxx event
> and GetJavascriptFunctions defines all of these functions. Is this
> correct?
> Also, what is the purpose of GetJavascriptInitFunctions()? How is
> it different
> from GetJavascriptOnloadfunctions()? Aren't the js functions listed
> in both
> of these executed just after the page loads?
>
> Thanks,
> Yahya Mohammad
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+
More information about the Chameleon
mailing list