Ok,
just found this works fine:
        $$('#'+table_id+'
caption').each(this.updateTableCaption.bind(this));

Andreas


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[EMAIL PROTECTED] Im Auftrag von Andreas Franke
Gesendet: Dienstag, 13. November 2007 12:50
An: [email protected]
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to