I have designed a survey in which I am using TOC feature. A pop-up comes up whenever I click on "Back" button, on the pages that comes under TOC. Can we remove this or hide this using custom script?
Page 1 / 1
You can hide the Back button like this:
```
this.hidePreviousButton();
```
```
this.hidePreviousButton();
```
Thank you for your response. But my client has specifically asked for "Back" button on all the pages. The only thing I want to hide right now is "Confirm navigation" pop-up. Is there any way I can hide it?
Hi Tanu!
I came across with the same question. By any chance you have figured out how to turn it off?
I managed to do this with a JS in the header:
// Script to automatically click "Go Back" in the error dialog
(function() {
function closeErrorDialog() {
var dialog = document.querySelector('.PageErrorDialog.TOC');
var goBackButton = dialog ? dialog.querySelector('.ErrorButtons button:first-child') : null;
if (dialog && goBackButton) {
goBackButton.click();
}
}
setInterval(closeErrorDialog, 500); // Check every 500 milliseconds
})();
Note that setting a very short interval can increase the load on the browser, as it will be running the check more frequently.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.