Check out the LimeSurvey source code on GitHub!

How to display progress bar on page load for each question

More
5 years 8 months ago #62225 by joeculler
Since my android client is 1.5, rendering each page is very slow.
I want to display progress bar after click "Next" button for the question page.
Anyone knows how to do? Thank you.

Please Log in to join the conversation.

More
5 years 8 months ago #62234 by tpartner
I don't understand. Do you want to show progress in the survey or page loading?

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 8 months ago #62238 by joeculler

tpartner wrote: I don't understand. Do you want to show progress in the survey or page loading?


Sorry for the confusion! I want to show progress in page loading. Thanks.

Please Log in to join the conversation.

More
5 years 8 months ago #62247 by tpartner
I don't think you can do that. The load time is not entirely a function of LimeSurvey or the server - it depends on the client.

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 8 months ago #62258 by joeculler
Hmm. We use jQuery, creating a waiting/loading page for processing long requests
should not be a problem, I think.
There's an example to archive this:
www.java2s.com/Code/JavaScript/Ext-JS/Wa...llstopafter5secs.htm

Please Log in to join the conversation.

More
5 years 8 months ago #62271 by tpartner
As far as I know, the JavaScript solutions are to be displayed while a process occurs after the page is loaded (like an AJAX call), not while the page loads.

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 8 months ago #62291 by joeculler
Thanks for clearing things up. Is it possible to do:
Assuming I have three questions, when the question one page is loaded,
Press "Next" button -> show progress bar -> show question two -> press "Next" button ->
show prorgress bar -> show question three ... etc.
Thank you again.

Please Log in to join the conversation.

More
5 years 8 months ago #62292 by tpartner
Not as far as I know because the Next button causes a complete reload of the page so there is nothing to display the progress on while this happens. No page exists in the interim.

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 8 months ago #62296 by joeculler
Ah, that's too bad. I'm wondering if user clicks
"Next" button, then lock that button until the
next question page shows up. As I mentioned,
rendering each page takes about 4 - 5 seconds on
the client, users could click "Next" button several
times in each question page, I want to prevent that.
Or do you have idea to solve my issue? Thank you.

Please Log in to join the conversation.

More
5 years 8 months ago #62304 by tpartner
In the current version 1.91 there is already a function in place to disable the navigation buttons while the form submits.

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 8 months ago #62325 by joeculler
You mean this patch: bugs.limesurvey.org/view.php?id=4985
If so, that didn't work correctly. I still can click "Next" page several times
within 5 seconds and can see that client sends request to http server while loading next question page.

Please Log in to join the conversation.

More
5 years 8 months ago #62326 by tpartner
No, this one - bugs.limesurvey.org/view.php?id=5124 .

Dumb question but you are using 1.91 and have JavaScript enabled?

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 7 months ago #62709 by joeculler
You're right. 1.91 fixed that problem. Thanks for taking the time to reply
my questions. Thanks again!

Please Log in to join the conversation.

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