- Posts: 13624
- Thank you received: 2490
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Prevent accidentially closing the survey
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
10 years 1 week ago #107456
by DenisChenu
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 Prevent accidentially closing the survey
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 topic has been locked.
- david2013
- Offline
- Senior Member
Less
More
- Posts: 42
- Thank you received: 6
10 years 1 week ago #107466
by david2013
Replied by david2013 on topic Prevent accidentially closing the survey
It seems it will jump to next compulsory question. If I have 50 questions on 50 different pages. Each question are compulsory. Now I want to test skip logic around Q40. Currently, I have to answer all the questions up to Q40. Are we able to let question index jump to Q40 directly? It will save a lot of time when testing.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
10 years 1 week ago #107467
by DenisChenu
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 Prevent accidentially closing the survey
No .... stop at first error, but don't stop at actual page.
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 topic has been locked.
- jonsen
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 3
9 years 11 months ago #107913
by jonsen
Replied by jonsen on topic Prevent accidentially closing the survey
Denis, thanks again for your solution! The reason why it did not work for me was that I changed the wrong template - d'oh!
But I have one (I think quite important) addition to your code. In order for participants to be able to leave the survey without a message AFTER completing, I added another condition to the if-statement:
(It detects if the div with the id "completed" exists on that page.)
If you agree, can you please add it to your code?
Best
Jonsen
But I have one (I think quite important) addition to your code. In order for participants to be able to leave the survey without a message AFTER completing, I added another condition to the if-statement:
Code:
if(!$('#submitted').length && !$('#completed').length)
If you agree, can you please add it to your code?
Best
Jonsen
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
9 years 11 months ago #107915
by DenisChenu
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 Prevent accidentially closing the survey
Hi,
Plese fill free to update our wiki :
manual.limesurvey.org/Workarounds:_Surve...y_closing_the_survey
Plese fill free to update our wiki :
manual.limesurvey.org/Workarounds:_Surve...y_closing_the_survey
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: jonsen
The topic has been locked.
- jonsen
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 3
9 years 11 months ago #107916
by jonsen
Replied by jonsen on topic Prevent accidentially closing the survey
I edited your post in the wiki...
Thanks and see you!
Thanks and see you!
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
9 years 11 months ago #107917
by DenisChenu
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 Prevent accidentially closing the survey
And maybe it's best to use something like this:
Think it's best (have to test ...)
Code:
if(!$('#submitted').length || $('.button,[name='move']').length)
Think it's best (have to test ...)
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 topic has been locked.
- jonsen
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 3
9 years 11 months ago #107997
by jonsen
Yes, that's probably better than finding it out based on the <div>. I'm not sure if that then covers all cases...
Replied by jonsen on topic Prevent accidentially closing the survey
DenisChenu wrote:
Code:$('.button,[name='move']').length
Yes, that's probably better than finding it out based on the <div>. I'm not sure if that then covers all cases...
The topic has been locked.
- LS_SR
- Offline
- Junior Member
Less
More
- Posts: 20
- Thank you received: 1
9 years 9 months ago #111049
by LS_SR
Replied by LS_SR on topic Prevent accidentially closing the survey
Where can I change the alert text and the alert-button text?
I tryed the program Poedit, but that's not working.
I tryed the program Poedit, but that's not working.
The topic has been locked.
- jonsen
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 3
9 years 9 months ago #111050
by jonsen
Replied by jonsen on topic Prevent accidentially closing the survey
Hi LS_SR,
you can adapt the German sentences in the code (at e.returnValue and return) BUT for Firefox and similar browsers, the text is built-in and you cannot change it. You would need to rewrite the function for Firefox. Also, you cannot change the text of the button of javascript's alert() function, so you would have to use a differnet solution to implement an alert with a custom button, like using jQuery's alert functions...
Best
jonsen
you can adapt the German sentences in the code (at e.returnValue and return) BUT for Firefox and similar browsers, the text is built-in and you cannot change it. You would need to rewrite the function for Firefox. Also, you cannot change the text of the button of javascript's alert() function, so you would have to use a differnet solution to implement an alert with a custom button, like using jQuery's alert functions...
Best
jonsen
The following user(s) said Thank You: LS_SR
The topic has been locked.
- LS_SR
- Offline
- Junior Member
Less
More
- Posts: 20
- Thank you received: 1
9 years 9 months ago #111051
by LS_SR
Replied by LS_SR on topic Prevent accidentially closing the survey
Thanks for your fast answer.
The topic has been locked.
- Taereian_43648
- Visitor
9 years 3 months ago #116036
by Taereian_43648
Replied by Taereian_43648 on topic Prevent accidentially closing the survey
Thanks a lot for your Code.
Do you now how it's possible to make en exception for the languagechanger?
Cheers
Benny
Do you now how it's possible to make en exception for the languagechanger?
Cheers
Benny
The topic has been locked.