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

Posts: 21
Registered: ‎09-09-2011
My Device: developer
My Carrier: developer

Playbook Webworks - adding ads banners and be redirected to another page

I've got an app for BB10Z which prints ads banners, so when the user clicks on it it is redirected to a webpage. This is working fine as the redirection in html5 is straight whithin the BB10 browser, and the link is inserted in the dom thru a javascript which call on the fly to the ads provider, in example, google ads, ebay, etc.

But in webworks for Playbook is not the same thing. Any webpage has to invoked thru args in blackberry.invoke.BrowserArguments. So any link generated by the ads provider turn to be an argument in the BrowserArguments and the question is how to implement it?

If i assign to a string variable, i.e.: args = link_ads_provider, this string has special characters that turn to result in a broken string in the BrowerArguments so link wouldn't work.


Any idea?






Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Playbook Webworks - adding ads banners and be redirected to another page

Could you use the encodeURI (standard JavaScript) call to encode the special characters for use as a URL?

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.