I just started using Prototype today and think it's fantastic but
there's one issue I keep seeing and I'm not sure if it's the way I'm
implementing the onLoading option or something else.
When a user requests a page it loads a variety of interface components
(approximately 7) via Ajax. I'm using the onLoading option to display
a loading message while the content is pulled from the server. The
issue I'm seeing is that that when I use the onLoading option for
either Ajax.Updater or Ajax.Request sometimes it will permanently hang
on the loading screen even though I have validated that the data has
come back from the server and should be displayed. What's more
interesting is that it will always permanently hang on IE (6) and
intermittently on Safari.
An example of the source:
loadUserProfile = function() {
loadBioInfo(0);
loadContactInfo(0);
loadWVInfo(0);
}
loadBioInfo = function(state) {
new Ajax.Updater("profile_bio_pane","/wvis/app/fe/utility/
userAjaxLoader.php?func=loadBioInfo&v1="+state, {
onLoading: function() {
document.getElementById("profile_bio_pane").innerHTML =
"<img
src='image/progress.gif'>Loading WV Information";
}
});
}
loadContactInfo = function(state) {
new Ajax.Updater("profile_contact_pane","/wvis/app/fe/utility/
userAjaxLoader.php?func=loadContactInfo&v1="+state, {
onLoading: function() {
document.getElementById("profile_contact_pane").innerHTML = "<img
src='image/progress.gif'>Loading Contact Information";
}
});
}
loadWVInfo = function(state) {
new Ajax.Updater("profile_wv_pane","/wvis/app/fe/utility/
userAjaxLoader.php?func=loadWVInfo&v1="+state, {
onLoading: function() {
document.getElementById("profile_wv_pane").innerHTML =
"<img
src='image/progress.gif'>Loading Woodland Valley Information";
}
});
}
Could someone please tell me if this is an issue with my code or if it
is something with Prototype? Yes I'm fully aware that the code could
be more cleaner but I'm just testing out the functionality of
Prototype.
Thanks,
Jeff
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---