- Posts: 15
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
$(document).ready(function(){ $(window).bind("beforeunload", function(event) { return "Your data will not be saved!"; }); $('#movenextbtn, #movesubmitbtn').on('click', function () { $(window).unbind("beforeunload"); }); });
$(document).ready(function(){ if($('#movenextbtn, #movesubmitbtn').length > 0) { $(window).bind("beforeunload", function(event) { return "Your data will not be saved!"; }); $('#movenextbtn, #movesubmitbtn').on('click', function () { $(window).unbind("beforeunload"); }); } });