- Posts: 4
- Thank you received: 0
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
- Topic Author
- Offline
- New Member
Less
More
8 years 11 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
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.
- david2013
- Offline
- Senior Member
Less
More
- Posts: 42
- Thank you received: 6
8 years 11 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>
<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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
8 years 11 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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
8 years 11 months ago - 8 years 11 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 11 months ago by alexsmgrangeiro.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
8 years 11 months ago - 8 years 11 months ago #120184
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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 11 months ago by tpartner.
The following user(s) said Thank You: alexsmgrangeiro
The topic has been locked.
- alexsmgrangeiro
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
8 years 11 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.
- Bigred01
- Offline
- Premium Member
Less
More
- Posts: 88
- Thank you received: 33
8 years 11 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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13647
- Thank you received: 2491
8 years 11 months ago #120222
by DenisChenu
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.
Replied by DenisChenu on topic Display one picture on a page for 20 seconds
Use $("#yourimage").loadBigred wrote: ...Got a few complaints that they didn't get to see the images before the page auto submitted. ...
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.