Welcome to the LimeSurvey Community Forum

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

javascript dialog box not working on submit

  • ixtambay
  • ixtambay's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 7 months ago #204826 by ixtambay
Hi everyone!

Here's hoping for your help in this matter. I currently saw here that the script below would pop-up confirmation before clicking the submit button and after adding this line to one of the question nothing seems to happened when clicking the submit button.


<script type="text/javascript" charset="utf-8">

$(document).ready(function() {

// Interrupt the submit function
$('#movenextbtn, #movesubmitbtn').click(function(){
if(confirm('This is your final submission of survey. Do you want to continue?')) {
return true;
}
else {
return false;
}
});
});

</script>

Add to that i had tested a simple javascript alert box and it worked.

Thank you very much in advance for the help on this. Currently using Limesurvey 3.23.0.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 months ago - 3 years 7 months ago #204827 by Joffm
Hi, your problem is, you use a script that is not usable for version 3.x.

Sinse LS is based on bootstrap now the IDs of elements have changed.

Use #ls-button-submit instead.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 7 months ago by Joffm.
The topic has been locked.
  • ixtambay
  • ixtambay's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 7 months ago #204877 by ixtambay
Replied by ixtambay on topic javascript dialog box not working on submit
Thank you very much sir Joffm.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose