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: 3
Registered: ‎03-31-2011
My Device: Curve 8520
My Carrier: AT&T

Invoking Browser via HREF

How does one invoke the Playbook browser via an HREF link? I'm aware of the invoke API, but I'm wondering how to actually write the Javascript such that URL in the HREF is passed to the Javascript function. I'm using Jquery Mobile, if that makes a difference.


Thanks, and please excuse the newbie question.

Posts: 123
Registered: ‎03-22-2011
My Device: curve 8900
My Carrier: Rogers

Re: Invoking Browser via HREF

[ Edited ]

you need to pass that url to a function and do something like



// Get url from your link any way you'd like
// For instance 

function launchBrowser(url) {
  var args = new blackberry.invoke.BrowserArguments(url);
  blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);

$('.myButton').click(function() {
  var url = $(this).attr('href');


Oh and make sure that the URL you want to give access to is in the config.xml as well as the proper features you want access to (in this case blackberry.invoke and blackberry.invoke.BrowserArguments)