Page 1 of 1

How to create custom ajax spinner?

Posted: Fri Apr 26, 2013 1:10 pm
by w

I create a spinner createSpinner("/files/views/assets/image/ajax_loader.gif");

I made a dummy page with the image ajax_loader.gif on it.

I can get to the dummy page, look into the html to find the image URL and use this in the createSpinner.
But this does not work for a native app. The image should be included in the app, and I should use a sort of URL that is getting the image from the local app, not from an internet URL.

Can you help me?


How to create custom ajax spinner?

Posted: Fri Apr 26, 2013 1:36 pm
by Maryna Brodina

Hello! Use Appery.getImagePath(name) instead of path to the image. Here is more information http://docs.appery.io/javascript-api/...


How to create custom ajax spinner?

Posted: Fri Apr 26, 2013 1:52 pm
by w

The createspinner call is on a javascript page. How can I be sure that it will be called after the image was loaded first?


How to create custom ajax spinner?

Posted: Fri Apr 26, 2013 4:29 pm
by Kateryna Grynko

Hi,

You can call createSpinner before loading the image. The image will be loaded when it's needed.
If you definitely have to call javaScript code after loading the image then you can use "Page Show" event.