Bypass the 'Leave' message when changes are made

Stimulsoft Reports.JS discussion
Post Reply
nickdavies07
Posts: 25
Joined: Fri Jul 17, 2020 2:19 pm

Bypass the 'Leave' message when changes are made

Post by nickdavies07 » Wed Aug 05, 2020 8:05 am

I need to log a user out of an application automatically if there is no interaction for a period of time.

However, when I perform the redirect to log the user out, the browser prompts 'Are you sure you want to leave' when changes are made in the designer to the report.

How can I bypass this?
nickdavies07
Posts: 25
Joined: Fri Jul 17, 2020 2:19 pm

Re: Bypass the 'Leave' message when changes are made

Post by nickdavies07 » Wed Aug 05, 2020 12:10 pm

OK I've figured this out.

Set the

Code: Select all

designer.jsObject.options.reportIsModified
parameter to false and set

Code: Select all

window.onbeforeunload = null
after.
Lech Kulikowski
Posts: 3239
Joined: Tue Mar 20, 2018 5:34 am

Re: Bypass the 'Leave' message when changes are made

Post by Lech Kulikowski » Fri Aug 07, 2020 1:01 pm

Hello,

Thank you for the information.
Post Reply