Hello,
I have a problem and I cant solve it within 2 days.
here is a code:
var mapFeed = Class.create({
initialize: function() {
this.mess = [];
},
latestMessages: function() {
var appendMessages = this.collectMess.bind(this);
var check = new Ajax.Request('/lentas/latest',{
method: 'get',
onComplete: appendMessages
});
},
collectMess: function(r) {
this.mess.unshift(r.responseText.evalJSON());
},
loadMap: function() {
this.latestMessages();
// debug
alert(this.mess);
}
});
var map = new mapFeed();
map.loadMap();
But after calling last method loadMap() I get my map.mess still empty.
What I'm doing wrong? Please help me
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" 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/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---