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

New Contributor
Posts: 2
Registered: ‎07-25-2013
My Device: Bold 9900
My Carrier: AT&T
Accepted Solution

Javascript no working on Bold 9900 OS 7

I have an application that uses java script to close the active window.




function my_onload() {

window.open('', '_self', '');window.close();





This script works great on Internet explorer and also on the Blackberry 9700, but when I use it on a blackberry Bold 9900 OS7 the page stays open. It does not appear to see the script. Any suggestions on how to fix this would be greatly appreciated.



Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Javascript no working on Bold 9900 OS 7

window.close() is not supported on BBOS - because the browser application is *always* running and cannot be closed.  If you wish to enable a 'close' action in a WebWorks application, you can do so using the blackberry.app.exit() method.

Follow me on Twitter: @n_adam_stanley
Your app doesn't work? Use BlackBerry remote web inspector to find out why.