I copied just a small block out of a larger function. Here is the
entire function where 'element' is defined:
updatePod = function(url,headerText,elementID,headerID){
var element = $(elementID);
var header = $(headerID);
// Random identifier for created div layers.
var randID = 'elem' + Math.random();
// onCreate
element.hide();
// Insert loading graphic
new Insertion.After(elementID,'<div id="' + randID + '"
style="padding:5px;"><img src="../assets/images/icons/loading.gif"
width="18" height="18" align="absmiddle"> Loading...</div>');
// Change the header
header.update(headerText);
//Update the region
new Ajax.Updater(elementID, url, {
method: 'get',
evalScripts: true,
onSuccess: function(transport) {
showElement(elementID);
hideElement(randID);
},
onFailure: function() {
element.update('<strong>Error Loading Content</strong>');
}
});
}
Should this work?
Thanks for the quick reply,
MIke
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---