Bypass the 'Leave' message when changes are made

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

Bypass the 'Leave' message when changes are made

Post by nickdavies07 »

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: 28
Joined: Fri Jul 17, 2020 2:19 pm

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

Post by nickdavies07 »

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: 6247
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski »

Hello,

Thank you for the information.
Post Reply