Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Displaying message if change in custom panel app
Hi,
I am trying to display a message if the user has made some changes in the panel app page and does not save the changes and trying to redirect to some other page.
I tried with window. onbeforeunload it is not working properly.
<script>
window.onbeforeunload = function() {
return "Do you really want to leave our application?";
};
</script>
I tried to inspect element on the page. I found the source was not getting with the changing the panel app to some other page.
I am trying to display a message if the user has made some changes in the panel app page and does not save the changes and trying to redirect to some other page.
I tried with window. onbeforeunload it is not working properly.
<script>
window.onbeforeunload = function() {
return "Do you really want to leave our application?";
};
</script>
I tried to inspect element on the page. I found the source was not getting with the changing the panel app to some other page.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™