Roger6240907
Posts: 0
Joined: Mon Sep 16, 2013 5:33 pm

loading images only when shown on screen?

I execute a JSON request that returns a series of image urls. I want to load only the images that are currently in view so that it minimize the time and data download. I am looking for something like an event 'image show' as triggerable event of a image component. When the image is shown than execute the JS to load the url. Is this possible?

Thanks
Roger

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

loading images only when shown on screen?

Hi Roger -- I'm not sure I understand the question.. in this part:

[quote:]
I want to load only the images that are currently in view ...
[/quote]

Roger6240907
Posts: 0
Joined: Mon Sep 16, 2013 5:33 pm

loading images only when shown on screen?

Think about a JSON request returning 100 images. Let's say I can only fit 10 in the current view. Until the user scrolls down the other 90 are not shown. Is it possible to wait to load the other 90 until the user scroll down on the current page?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

loading images only when shown on screen?

You can build such app... your app simply runs in the browser (http://docs.appery.io/getting-started) so you can add any features you want with JavaScript.

Roger6240907
Posts: 0
Joined: Mon Sep 16, 2013 5:33 pm

loading images only when shown on screen?

Do you know the event to listen for when components come into view? it seems I cannot find it in Appery.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

loading images only when shown on screen?

All events that you see are browser or PhoneGap events. There are no Appery.io events. If you are asking when the page is loaded, you can use 'page load' event.

Return to “Issues”