Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: add a "loading" GIF while page is loading

add a "loading" GIF while page is loading 5 years 5 days ago #64823

  • atiut
  • atiut's Avatar
  • Offline
  • Senior Lime
  • Posts: 76
  • Thank you received: 2
  • Karma: 1
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.
The administrator has disabled public write access.

add a "loading" GIF while page is loading 5 years 4 days ago #64838

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6210
  • Thank you received: 1376
  • Karma: 539
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.
The administrator has disabled public write access.

add a "loading" GIF while page is loading 5 years 3 days ago #64865

  • atiut
  • atiut's Avatar
  • Offline
  • Senior Lime
  • Posts: 76
  • Thank you received: 2
  • Karma: 1
Thank you. It kind of makes sense.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.243 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form