Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
jamesfenster
Posts: 5
Registered: ‎05-24-2011
My Device: Developer

window.onbeforeunload not supported by WebWorks

Hi,

 

A lot of browsers (e.g. Chrome, Safari, etc.) offer support for window.onbeforeunload.

 

Example:

window.onbeforeunload = function() { return "Sure?"; };

 

WebWorks doesn't seem to offer this support.

 

How do you prompt the user to ask them whether they're sure they want to navigate away from a page?

 

Using window.onunload does not help either.  You can bring up a message on the unload, but you can't prevent the page from actually unloading.

 

Any help would be appreciated. 

 

James

New Contributor
jamesfenster
Posts: 5
Registered: ‎05-24-2011
My Device: Developer

Re: window.onbeforeunload not supported by WebWorks

Just to follow up.

 

So, there's no way to prevent a user from navigating away from a page in WebWorks?