- Posts: 17
- Thank you received: 0
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
- Topic Author
- Offline
- New Member
Less
More
3 years 7 months ago #204826
by ixtambay
javascript dialog box not working on submit was created 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.
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12940
- Thank you received: 3979
3 years 7 months ago - 3 years 7 months ago #204827
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic javascript dialog box not working on submit
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
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 17
- Thank you received: 0
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.