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

BlackBerry Advertising Service

Reply
Developer
Posts: 149
Registered: ‎02-19-2011
My Device: Bold 9930 and PlayBook

WebWorks advertising API causes ui.menu to fail

I am adding advertising to my WebWorks application and have found an issue.  For some reason I now get an exception when I create a menu for the BlackBerry phone app.  The exception itself is:

TypeError: Result of expression 'new blackberry.ui' [undefined] is not an object. 

This code has worked for several deliveries but now fails when I add the

<script type="text/javascript" src="http://www.blackberry.com/app_includes/asdk/adBanner.js"></script> 
<script type="text/javascript">
    var zoneId = 12345; // Provided by RIM replace before delivery
    var bannerObj = new blackberry.advertising.Banner(zoneId, "divId");
</script>

to my .html file.  Is this something other developers have experienced?  I am using BlackBerry_Advertising_Service_SDK_WW_1.0_B9 since BlackBerry_Advertising_Service_SDK_MR_2_6_B95 didn't appear to have any code geared towards WebWorks.  

"Not to know what happened before you were born is to be forever a child." Marcus Tullius Cicero