Hi everyone,
the code has been working well on all of my past surveys. BUT now I have a survey which contains a file uploader question and there IT DOESN'T WORK CORRECTLY!
How to replicate the problem:
1. Add the code (
www.limesurvey.org/manual/Workarounds:_S...y_closing_the_survey
) to your template.js
2. Add a file uploader question
3. Navigate through the survey. If you open the file uploader, you will be asked if you want to leave the page EVEN THOUGH you use the LS navigation (the "next" or "previous" buttons).
4. Notice that you will not have the this problem if you just pass through that question without opening the uploader iframe.
The function works based on a <input type="hidden" id="submitted" /> tag being added when using the navigation, which then again is being checked for by the "goodbye" function to see if the buttons were used. The interesting point: Even though this tag is appeded to the end of the <body> correctly when using the navigation (even after opening the file uploader), the goodbye function does not recognize it. How can this be? It works flawlessly for all other pages, why not here? Does it have something to do with the iframe (which is the only differnce to other pages that I can see)?
I'm really looking forward to a new perspective on this, as I have been stuck on this for a week now. Thank you very much!
Best
Jonsen