In case it helps, here's a working example. http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/loadingspinner
Cheers, Geoff On 27/12/2012, at 8:40 PM, mateen wrote: > Hi, > > I looking to implement a AJAX Throbber for all ajax calls. This is my java > script function. > > Tapestry.onDOMLoaded(function() { > function addAjaxOverlay(event, element) { > var mgr = Tapestry.findZoneManager(element); > var zone = mgr && mgr.element; > if (!zone) { > return; > } > var $zone = $(zone); > $zone.prepend("<div class='zone-ajax-overlay'/>"); > var overlay = $zone.children(":first"); > overlay.width($zone.width()).height($zone.height()); > } > > $(document.body).bind(Tapestry.FORM_PROCESS_SUBMIT_EVENT, > addAjaxOverlay); > $(document.body).bind(Tapestry.TRIGGER_ZONE_UPDATE_EVENT, > addAjaxOverlay); > }); > > > Show Pending > > > Now when i include the above js in my page, i get a "Page must be specified > before initializing for partial page render." > > > Here is my the code called for the click event > > ajaxResponseRenderer.addRender( "searchTransactionZone", > searchTransactionZone.getBody( ) ).addRender( > "pendingTransactionsZone", > pendingTransactionsZone.getBody( )).addRender( > "processedTransactionsZone", processedTransactionsZone.getBody( )); > > this is the only code that is called. the return type of the function is > null. Without including the JS my page works fine. Only after this JS does > my application crash when doing a AJAX call. > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/AJAX-Throbber-tp5718999.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org