wicket supports global javascript event handlers for this. either search the list or look inside wicet-ajax.js, i cant recall them off the top of my head.
-igor On Sat, Jun 7, 2008 at 8:59 AM, Martin Makundi <[EMAIL PROTECTED]> wrote: > Hi! > > I am trying to maneuvre a lightweight gmail-style busy indicator to > stay in place whenever I click an operative button. > > The script seems to work fine with regular submit buttons, but I have > not found a proper way to reset the indicator in context with ajax > buttons and links. > > Is there an event I could bind this to, or do I have to push some > javascript from the server side / tweak the wicket-ajax.js? It would > be pretty nice if I could just overload/hook-to something on > javascript level. > > Here is my code: > > <style type="text/css"> > #busysign { > display: none; > float: right; > background: red; > margin-top: 5px; > margin-right: 5px; > z-index: 1000; > width: 200; > font-weight: bold; > text-align: center; > font-size: 1.3em; > } > </style> > <script type="text/javascript"> > window.onload = setupFunc; > > function setupFunc() { > document.getElementsByTagName('body')[0].onclick = clickFunc; > } > > function clickFunc(eventData) { > var clickedElement = (window.event) ? event.srcElement : eventData.target; > if (clickedElement.tagName == 'BUTTON' > || (clickedElement.tagName == 'INPUT' && (clickedElement.type == > 'button' || clickedElement.type == 'submit'))) { > document.getElementById('busysign').style.display ='inline'; > } > } > </script> > > > I would equally well appreciate if you had some alternative generic > lightweight solution :) > > > ** > Martin > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]