Hi Robert,
I would use
Ext.onReady(function(){…});
because it is a cross-browser event handling function and should work in all
browsers as expected. Also, this way your programming logic code is separated
from the HTML of the page and makes for a cleaner solution. If you are using a
cross-browser library anyway using the library’s method would be my general
suggestion.
Cheers,
Tim
From: [email protected] [mailto:[email protected]] On Behalf Of
Robert Buckley
Sent: Saturday, 5 February 2011 5:02 a.m.
To: [email protected]
Subject: [Users] onload ="init();" or ext.onReady(function()...)
Hi,
When developing a relatively large ext/geoext app, which would be the best way
of starting the app from the initial html page? I am rather confused about
which does what and which is better for performance.
As far as I can understand the following happens..
onload="init();" triggers the javascript code when the html page is fully
loaded into the browser
Ext.onReady(function()...loads when the ext.js library has been loaded into the
browser (..cache?)
so which is more effective?
yours,
Robert
________________________________
Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential.
If you receive it in error: (i) you must not read, use, disclose, copy or
retain it; (ii) please contact the sender immediately by reply email and then
delete the emails.
The views expressed in this email may not be those of Landcare Research New
Zealand Limited. http://www.landcareresearch.co.nz
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users