I am trying to add a loading Window/icon to question with a long loading time but after trying myself it is not easy. I have used this code so far in "script/template.js:
Code:
document.onreadystatechange =function(){var state = document.readyState
if(state =='complete'){
setTimeout(function(){
document.getElementById('loading');
document.getElementById('probe').style.visibility="hidden";},1000);}}
But the Loading window just show up while the page is loading and after each question. I am trying to extend this period from the moment I click on the next button until the page is completely loaded. It would be great if you can help me.
Thank you very much
Last edit: 7 years 1 month ago by DanielFriedrichSchulz.
The way is to :
Add a loading class to the body,
Remove this class with jquery ready function (best is to replace with loaded)
And add an element at start of your page show when body class name is loading, hide other element when class is loading.
Add the class when the page is unloaded.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.