Thank you for your help crowder. When i said "It's as if the
ajax.responders onComplete method isn't called." I meant that i really
thought that it wasn't - i.e. just a turn of phrase.
you're right the commented out loadPage request was only commented out
because it wasn't working.
I've changed the code as you suggested and it works fine now. I
didn't realise all that stuff about writing over the original object
and losing the reference.
Anyway, it's sorted now, thanks for the direction
kenneth
ajaxPageTimer = new __ajaxTimer('ajaxPageTimerBox',100);
Ajax.Responders.register({
onCreate: function(){
if (!ajaxPageTimer.animating) ajaxPageTimer.startAnimation();
},
onComplete: function(){
ajaxPageTimer.stopAnimation();
}
});
var mainPages = Array();
var myRequests = new Object;
function loadPages(pageSource, page) {
var url;
var i = 1;
loadPage();
function loadPage() {
url = "incfiles/main" + i + ".php";
myRequests[i] = new Ajax.Request(url, {
onSuccess: function(transport){
mainPages[i] = url;
pasteMainContent.defer(transport.responseText,
i);
i++;
if (i<menu.num+1) loadPage(); //so
this is faux asyncronous
}
});
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" 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-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---