From: Cornelius J. <cj...@vi...> - 2006-08-16 22:09:06
|
Hi Timo Thank you very much. This sorted it out for me.. I was a little dazed and confused, augmented by the fact that i was using a version of AjaxUpdateLink based on AjaxComponent, not AjaxDynamicElement. so the onClick handlers weren't being appended. But the step by step really eased the way for me. Strangely the onComplete and onSuccess handlers fire almost simultaneously. and before some long requests actually render their content back into the page. Otherwise it's perfect. So is anyone interested in a load on demand collapsible component? I can clean it up a bit and send it, wanted to ask before i send attachments to the list. It's basically apple's collapsible component enhanced with Wonder's Ajax magic. many regards and thank you for the help guys and girls Cornelius > Exactly this is what is happening: It will always add "new > Ajax.Request(...)" to the onClick of the link. If you add a onClick > binding to the AjaxUpdateLink component, it will append whatever you > specify after the request part. E.g. you specify "bla()" for the > onClick binding, the onClick on the link will be "new Ajax.Request > (...);bla()". > > I just commited an updated example for busy indicators (now both > individual & global) to the AjaxExamples project and the > AjaxBusyIndicator Component to the Ajax framework. > > Here's what I'm doing there: > > HTML: > > Click <webobject name = "Link"> here </webobject> to make a long > running AJAX request, <br /> > individual load indicator (configured on AjaxUpdateLink) will show > up here: <img src="http://www.napyfab.com/ajax-indicators/images/ > indicator.gif" id="busy1" style="display:none;"/> <br/> > <hr /> > <hr /> > Click <webobject name = "OtherLink"> here </webobject> to make some > other long running AJAX request, <br /> > individual load indicator (configured on AjaxUpdateLink) will show > up here: <img src="http://www.napyfab.com/ajax-indicators/images/ > indicator.gif" id="busy2" style="display:none;"/> > > WOD: > Link: AjaxUpdateLink { > updateContainerID = "container"; > action = longRunningAction; > onClick = "Element.show('busy1')"; > onComplete = "function(x){Element.hide('busy1')}"; > } > > OtherLink: AjaxUpdateLink { > updateContainerID = "container"; > action = longRunningAction; > onClick = "Element.show('busy2')"; > onComplete = "function(x){Element.hide('busy2')}"; > } > > >> thx for any pointers. >> > > Hope it helps. It's quite easy to get unexpected results if a JS > error happens somewhere and you don't notice it. FireFox with the > ForeBug extension helps a lot here. > > Timo > > > > > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Wonder-disc mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-disc > |