11-27-2009 06:00 AM
I read about
Application Event Object
var answer = confirm("Leave this application?");
I 've added the feature element in config.xml.
But nothing happens when i exit from application using the exit button on simulator.
Solved! Go to Solution.
11-27-2009 06:50 AM
Have you called trapForApplicationExit() from somewhere?? Just putting that sample code in your script won't magically make it run You need to call trapForApplicationExit() - probably from whatever function you've written to handle the document load.
Note that you need to enable two features for the above script to work - blackberry.app and blackberry.app.event. Remember too, as I've just said in your other thread, that if the page/script is being served from a remote server (instead of being local to the widget) you need to have the feature elements contained within the relevant access element.
12-10-2010 12:42 AM
I used this work around. it worked on the Torch but you need to click on close twice. good luck.
var answer = confirm("Leave the application?");