[Seaside] "Element.extend is not a function" anybody?

Sebastian Sastre ssastre at seaswork.com
Mon Jun 11 17:33:15 UTC 2007


Hi, updates..
 
    I've found that it seems to be related to the onLoad method invocation.
Somebody can confirm me if the onLoad event is triggered before or after the
scripts of the page can be used (invoke it's objects, etc)?
 
    If I don't call objects on the onLoad (of the page, the one that is in
the script part of <BODY>) then the error don't happen but I'm unable to
understand exactly why it's behavior is that,
 
    thanks,
 
Sebastian Sastre

 


  _____  

De: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] En nombre de Sebastian
Sastre
Enviado el: Domingo, 10 de Junio de 2007 19:08
Para: 'Seaside - general discussion'
Asunto: [Seaside] "Element.extend is not a function" anybody?


Hi there, 


  I've see a couple of questions in the Prototype list about this but none
with a direct 
answer. I've also asked there but haven't had a single answer about that in
two days. I'm starting to suspect I should know better what happen at load
page time to see if everything is ok in this Seaside component.

  The thing is that a couple of days ago I've starting to see this message
with 
Firebug. Anybody see this sometimes? Under which situation could possibly
be? 


Message is:

Element.extend is not a function 


I'm using 


var Prototype = { 
10 Version: '1.5.1_rc1', 
... 


in Firefox 2.0.0.4 


   Debuggin from my own code just after it calls a 


var candidate = $(anElementId) 


   I followed this: 


function $(element) { 
1227 if (arguments.length > 1) { 
1228 for (var i = 0, elements = [], length = arguments.length; i < 
length; i++) 
1229 elements.push($(arguments[i])); 
1230 return elements; 
1231 } 
1232 if (typeof element == 'string') 
1233 element = document.getElementById(element); 
1234 return Element.extend(element); 
1235} 


and executing line by line I saw that it reaches line 1233 with the 
appropriate (unextended) element and when executing line 1234 it says 
"Element.extend is not a function" 


Surely something basic is going on here but I'm unable to see what. 
Does anybody see what is going on? 


 thanks, 


Sebastian 
PS1: all this code is being executed starting from an invocation in the 
onLoad() of the script of the page 

PS2: I've already tried, and had the same results, with the last version of
Prototype 1.5.1 downloaded today from it's site (and processed the ' chars
to properly update the #prototypeJs method in SULibrary class).
 
PD3: is for the framework I've mentioned in the previous mail I've sent
today
 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070611/e0be95c2/attachment.htm


More information about the Seaside mailing list