Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

preload visual images via online limesurvey

More
9 years 11 months ago #107129 by s_f
Hi guys,

There was a post on preloading images but it seemed to go over my head because I have no background in programming. The codes were extremely confusing and after trying for 5 whole days, I decided to ask this question.

I have to present a series of visual images one at a one for 3 secs. each. I'm using the online lime survey with my own server to develop this experiment. Because I am running this experiment online, some people are having issues with images being really slowly loaded and before they are completely loaded, the 3 sec. are up and it moves to the next image. Is there anyway I can pre-load all my images? If so, should I enter some code under the 'source' option in one of the question type or group section?

Thank you.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 11 months ago #107142 by tpartner
Replied by tpartner on topic preload visual images via online limesurvey
Are all of these images displayed on the same page?

How are you showing them "one at a one for 3 secs. each"?


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
9 years 11 months ago #107154 by s_f
I've created a new group (with a question type) for each image as a boilerplate with a timer of 3 sec after which is moves on to the next group. The survey is setup as 'show group by group'. Thus, each image is presented one at a time.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 11 months ago #107159 by tpartner
Replied by tpartner on topic preload visual images via online limesurvey
In that case, preloading won't help you - you are already loading the image as the page loads. I think your problem lies in server or device performance.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 11 months ago #107165 by holch
Tony, I think what s_f means is that as there are only 3 seconds, sometimes the picture isn't loaded completely yet, but the test moves already forward. It could easily be that the timer already counts, while the picture is not there yet.

Wouldn't it be an option to load the pictures on the first page but hide them from displaying, thuse they should be in the browser cache and should load really quickly once it comes to the page with the timer?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 11 months ago - 9 years 11 months ago #107167 by tpartner
Replied by tpartner on topic preload visual images via online limesurvey
Sure, good idea holch!

You wouldn't even need any script to do that. Simply put something like this in the source of the welcome message or the first group description:

Code:
<img style="position:absolute; left:-9999em;" src="http://www.google.com/logos/2011/thai_elephant_day11-hp.jpg" alt="" />
<img style="position:absolute; left:-9999em;" src="http://www.google.com/logos/2012/malaysia12-hp.jpg" alt="" />
<img style="position:absolute; left:-9999em;" src="http://www.google.com/logos/2012/200th_anniversary_of_grimms_fairy_tales-986006-hp.jpg" alt="" />
<img style="position:absolute; left:-9999em;" src="http://www.google.com/logos/2012/finland_independence_day_2012-987005-hp.jpg" alt="" />


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 9 years 11 months ago by tpartner.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose