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
Trusted Contributor
bertho_joris
Posts: 100
Registered: ‎03-31-2012
My Device: Blackberry 9780
My Carrier: Telkomsel

Right Click Disable

Particular page of the application, I want to disable the back button and I want to use the blackberry menu.

How do I disable the back button on a blackberry?

Regards,
Bertho
Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 614
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: Right Click Disable

Hello,

 

Take a look at this solved thread which deals with trapping the Back button. http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Disable-Capture-the-Escape-Back-...

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 614
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: Right Click Disable

Sorry, I just realized that thread points to a bad link.

 

Here's some sample code to trap the Back key.

 

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

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

 

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.