Thanx a lot! I would never guess this extra comma can be the reason in
IE. Indeed, I started to debug it in IE and noticed it produced
'undefined' on the last iteration. So I decided to insert a condition
if(n){}:
...
        init: function(id, nodes) {
                var id = id || 'staff' ;
                var nodes = nodes || this.nodes;
                nodes.each(function(n) {
                        if(n){
                                n.container = nodes;
                                this.createDOMFragment(id, n);
                                if (n.children)
                                        this.init(n.id, n.children);
                        }
                }.bind(this));
        },
...
But now on removing the extra comma the condition is unnecessary.

to Christophe: I checked this version at
http://media.pragprog.com/titles/cppsu/code/prototype/dom/people.js to
make sure I haven't made any errors on my own. But this sneaky comma
is there.

Btw. is there a decent debugger for IE like Firebug for Firefox? Maybe
you could recommend something.
Thank you
--~--~---------~--~----~------------~-------~--~----~
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