Welcome to the LimeSurvey Community Forum

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

Display one picture on a page for 20 seconds

  • alexsmgrangeiro
  • alexsmgrangeiro's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #120145 by alexsmgrangeiro
Display one picture on a page for 20 seconds was created by alexsmgrangeiro
Hello,

I'm building a questionnaire and I would like to know how to display one picture on a page for 20 seconds before automatically switch to a new page.

Thanks
The topic has been locked.
More
8 years 10 months ago #120150 by david2013
Replied by david2013 on topic Display one picture on a page for 20 seconds
I think you need some jQuery to do that. The following code will auto submit the page after 20 seconds. I didn't test it. If you want, give a try.

<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
setTimeout(
function() {
$('#movenextbtn').trigger('click');
}, 20000);

});
</script>
The following user(s) said Thank You: alexsmgrangeiro
The topic has been locked.
  • alexsmgrangeiro
  • alexsmgrangeiro's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #120152 by alexsmgrangeiro
Replied by alexsmgrangeiro on topic Display one picture on a page for 20 seconds
I do not understand how to put the picture.
The topic has been locked.
  • alexsmgrangeiro
  • alexsmgrangeiro's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago - 8 years 10 months ago #120153 by alexsmgrangeiro
Replied by alexsmgrangeiro on topic Display one picture on a page for 20 seconds
It worked. Thank you. You know how to remove the "next" button on this page.
Last edit: 8 years 10 months ago by alexsmgrangeiro.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago - 8 years 10 months ago #120184 by tpartner
Replied by tpartner on topic Display one picture on a page for 20 seconds
Code:
<script type="text/javascript" charset="utf-8">
    $(document).ready(function() {
        $('#movenextbtn').hide();
    });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 10 months ago by tpartner.
The following user(s) said Thank You: alexsmgrangeiro
The topic has been locked.
  • alexsmgrangeiro
  • alexsmgrangeiro's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #120202 by alexsmgrangeiro
Replied by alexsmgrangeiro on topic Display one picture on a page for 20 seconds
Thanks. Its Work.
The topic has been locked.
More
8 years 10 months ago #120204 by Bigred01
Replied by Bigred01 on topic Display one picture on a page for 20 seconds
Document ready can trigger before images are loaded. It's recommended to use $(window).load since this will fire after everything including images have loaded. I have experienced this issue once on a survey with a timer for images. Got a few complaints that they didn't get to see the images before the page auto submitted. I too was using document ready. This stackoverflow post talks about the difference. stackoverflow.com/questions/544993/offic...e-executing-somethin
The following user(s) said Thank You: alexsmgrangeiro
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago #120222 by DenisChenu
Replied by DenisChenu on topic Display one picture on a page for 20 seconds

Bigred wrote: ...Got a few complaints that they didn't get to see the images before the page auto submitted. ...

Use $("#yourimage").load
Code:
$(document).ready(function() {  
    $(".submit").hide();
    $("#imageload").load(function() {
      window.setTimeout(function() {
        $('#movenextbtn').click();
      }, 5000)
    });
  });

Exemple : demonstration.sondages.pro/27177 (in french)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: alexsmgrangeiro
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose