Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Contributor
ashokkonraiyandi
Posts: 13
Registered: 01-24-2012
My Carrier: Airtel

Backbutton

Hi I,m using BB9860 on that when ever i hit the manual backbutton my application is exit i want it goes to the previous page how can i do that?,can any one instruct me? thank you

Please use plain text.
New Contributor
yoghurt1001
Posts: 9
Registered: 07-31-2011
My Carrier: O2 Germany

Re: Backbutton

Hey, i haven't used it myself but the documentation explains a SystemEvent onHardwareKey function where you can catch certain keys that are pressed and attach a function. Here is a code snippet from the api:

 

<script type="text/javascript">
function trapForBackKey() {
blackberry.system.event.onHardwareKey(blackberry.system.event.KEY_BACK, handleBack);
}

function handleBack() {
alert("handle back button");
}
</script> 

Please use plain text.
Contributor
ashokkonraiyandi
Posts: 13
Registered: 01-24-2012
My Carrier: Airtel

Re: Backbutton

Thank you i have an another doubt where i have to use this in phonegap or my js file

 

thank you

Please use plain text.
New Member
Jerlies
Posts: 1
Registered: 02-09-2012
My Carrier: AT&T

Re: Backbutton

What doubt?

Please use plain text.
Contributor
ashokkonraiyandi
Posts: 13
Registered: 01-24-2012
My Carrier: Airtel

Re: Backbutton

Where i have to use that code in main.js or phonegap

Please use plain text.
New Contributor
yoghurt1001
Posts: 9
Registered: 07-31-2011
My Carrier: O2 Germany

Re: Backbutton

I'm not using phonegap but I think it only adds some additional features to the base api of webworks, so I would try to put it in the native javascript code (main.js in your case). 

Please use plain text.
Contributor
ashokkonraiyandi
Posts: 13
Registered: 01-24-2012
My Carrier: Airtel

Re: Backbutton

Ok thank you let me check with that....

Please use plain text.
Contributor
ashokkonraiyandi
Posts: 13
Registered: 01-24-2012
My Carrier: Airtel

Re: Backbutton

Hi

   

 Thank you the manual backbutton is working in webworks SDK 2.2 but not in 2.3 is there any one use with 2.3.1.

 The backbutton is working on the 2.3.1?

Can any one suggest me the solution.

Please use plain text.