[Seaside] "Element.extend is not a function" anybody?
ssastre at seaswork.com
Mon Jun 11 18:44:56 UTC 2007
> > unable to understand exactly why it's behavior is that,
> Generally onLoad should be only evaluate when everything has
> been loaded, there are some browser that don't support this
> event properly though.
> Sometimes it helps to delay the execution of some events a
> little bit, to make sure everything has settled.
well I'm starting to think that order could be the problem. First
another update: I've learn just now that #onLoad is "sent" only to BODY,
FRAMEsomething and other tag but not DIVs which was where I was trying to
use, so I've move the invocation to a <script> just after the div but the
problem is that if I let it there I start receive again the "Element.extend
is not a function".
So.. Questions: 1) which are the "best practices" for guaranteeing
order? 2) how can I check or manipulate that load order?
PD: just to contextualize: what I'm trying to do is the initialization of a
js singleton that should be instantiated after everything is loaded. Besides
the initialization of this singleton (called ElementManager) there should be
"someone" (I'm unsuccesfully trying with a BODY onload) that add
someElements to it. Those someElements are objects that wrapps the prototype
DOM extended elements. One wrapper for each div that I've also made to wrap
seaside components of some class.
More information about the Seaside