Ok,
just found this works fine:
$$(''#''+table_id+''
caption'').each(this.updateTableCaption.bind(this));
Andreas
-----Ursprüngliche Nachricht-----
Von: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
[mailto:rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] Im Auftrag
von Andreas Franke
Gesendet: Dienstag, 13. November 2007 12:50
An: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Betreff: [Rails-spinoffs] Confused...
Hi,
I''m just a little bit confused because of this:
var JSMasterTable = Class.create();
JSMasterTable.prototype={
Table : null,
TableCaption: "",
initialize: function(table_id){
this.Table = $(table_id);
//Tabellen Caption stetzen
this.setTableCaption(table_id);
$$(''#''+table_id+''
caption'').each(this.updateTableCaption);
},
setTableCaption: function(caption){
this.TableCaption = caption;
},
getTableCaption: function(){
return this.TableCaption;
},
updateTableCaption: function(element){
element.update(this.getTableCaption());
}
};
var MT = new JSMasterTable("ID_of_MyHTMLTable");
I always get the errormessage: this.getTableCaption is not a function
But why? Can''t find any mistake in the code. Am I blind?
Thanks for helping
Andreas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---