Are you saying that the script doesn't populate the "loadReviews" div fast
enough so the next function called fails?
I'm not sure what your question is...
var getreviews = new Request.HTML({
url: '/RVS.php',
method: 'get',
onRequest: function(){
$('loadReviews').set('text', 'loading...');
},
onSuccess: function(response){
$('loadReviews').empty().adopt(response);
this.adjustReviewHieght();
}.bind(this);
}).send();
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Dailce
Sent: Saturday, February 12, 2011 11:26 PM
To: MooTools Users
Subject: [Moo] Re: Request.html - wait for request to finish?
Hello,
I have narrowed my problem to the following:
var getreviews = new Request.HTML({
url: '/RVS.php',
method: 'get',
onRequest: function(){
$('loadReviews').set('text', 'loading...');
},
onComplete: function(response){
$('loadReviews').empty().adopt(response);
}.bind(this),
onSuccess: function(){
this.adjustReviewHieght();
}.bind(this)
}).send();
My problem is that the onSuccess if firing before the html page is loaded.
How can I call this.adjustReviewHieght(); only after the response is loaded?
I'm thinking of chaining, but don't know how.
Any ideas?