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
Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

How to get menu option is Phonegap

Hi

 

How to get menu option in phone gap using java script. Actually i think this is not possible because in Iphone or in touch blackberry  there is no possiblity of menu button..

 

Thanks

BlackBerry Development Advisor
Posts: 761
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: How to get menu option is Phonegap

Hello,

 

I don't believe Cordova has a menu API.  You may have to use the BlackBerry API instead.

 

Documentation @ https://developer.blackberry.com/html5/apis/blackberry.ui.menu.html

 

<script type="text/javascript">
  function loadCustomMenuItemsForPage() {
    if (blackberry.ui.menu.getMenuItems().length > 0) {
      blackberry.ui.menu.clearMenuItems();
    }
    
    var item = new blackberry.ui.menu.MenuItem(false, 1, "Click Me", customMenuItemClick);
    blackberry.ui.menu.addMenuItem(item);         
  }

    function customMenuItemClick() {
      alert("user just clicked me");
    }
</script>

 

Highlighted
Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: How to get menu option is Phonegap

Hi

 

sir thanks for reply but Cordova  support all platform .i think this code is not supported in other platform , i need some menu option which support in all platform..i think is this not possible 

 

Thanks