I am trying to show a spinning bar in a ajax zones updates. I have imported the following js function in my project.
Tapestry.onDOMLoaded(function() {
function addAjaxOverlay(event, element) {
alert("Its hrerer");
var mgr = Tapestry.findZoneManager(element);
var zone = mgr && mgr.element;
if (!zone) {
return;
}
var $zone = $(zone);
$zone.prepend("
var overlay = $zone.children(":first");
overlay.width(500).height(600);
}
$(document.body).bind(Tapestry.FORM_PROCESS_SUBMIT_EVENT, addAjaxOverlay);
$(document.body).bind(Tapestry.TRIGGER_ZONE_UPDATE_EVENT, addAjaxOverlay);
});
Now i got the code from here. and had the code translated into JQuery. But nothing really happens. The spinner is not shown. If I add the alert box below the last two lines of the document, it works, but it seems that the addAjaxOverlay function is never been called. The alert box inside the function does not work.