Check out the LimeSurvey source code on GitHub!

add a "loading" GIF while page is loading

More
5 years 6 months ago #64823 by atiut
I have a huge one-screen survey that had to include all towns and villages in Romania. Naturally, it loads slowly, so I would really need some warning to keep the respondents engaged.

Now, the behaviour of the page, measured on a slow connection is as follows:

Stage A: blank white page, elements are loading in the background: 10 sec (sic)
Stage B: graphical elements start loading: 0.5-1 sec
Stage C: the page is fully usable, but some elements (img tags etc) still load in the background: 3-4 sec

I have tried a couple of javascripts found on the net, but, at best, the image was shown in stages B and C, preventing the respondent to use the page until it loads fully.

What I need is a solution to cover A+B, though A alone would really be sufficient.

Also, after running a check on the page, it would seem that the Javascript took more than 50% of the overall load time. So maybe the GIF should be shown only as long as the Javascript is not fully loaded. (Note: the page is not script-intensive, i guess it is the std script processing lots of data)

I am using a modified version of the default theme.

Please Log in to join the conversation.

More
5 years 6 months ago #64838 by tpartner
You may not be able to insert an image in Stage A. That may be while the script(s) are accessing the database and constructing the DOM. Without a DOM you can't have an image.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 6 months ago #64865 by atiut
Thank you. It kind of makes sense.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form