Topic: Changing Header Button Image to Spinner when Async

Hi,

How can I change my button image on the header into a spinner to open other slide..?

Re: Changing Header Button Image to Spinner when Async

Give an id to your button and call:

WA.Loader(myID, 1)
/!\ Don't forget to "Like" WebApp.Net from the homepage.

Re: Changing Header Button Image to Spinner when Async

Hi,

Thanks for the reply

My button is in a form of link "<a href .... </a>

Implementation are as follow:

<div class="iGroup>
<div class="iLayer" id="layerId" title="Layer Title>
    <a id="btnId" href="Layerpage_add.php#_layer" rel="action" rev="async" class="iButton iBClassic" ><img src="Img/icon_add.png" alt="More" /></a>
   
   
   some code here


</div

As you can see, there is a button to appear at the right side of the header with the code above. and it has an image (icon_add.png). This link will call a php page in an async form. Where would I call the WA.Loader() function so that that image will be replace by a spinner while on async?

Thanks for your help...
</div

Re: Changing Header Button Image to Spinner when Async

If you use and asynchronous request with WA.Submit or WA.Request, you can catch "beginasync" and "endasync" event using WA.AddEventListener
to (de)activate the loader.

/!\ Don't forget to "Like" WebApp.Net from the homepage.