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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Regular Contributor
Posts: 61
Registered: ‎03-28-2010
My Device: Bold 9700
My Carrier: Maxis Malaysia

bbUI - bb.onscreenready : how to manipulate innerHTML?



Using bbUI toolkit, from my index.htm, I called bb.onscreenready with the following


<script type="text/javascript">
bb.onscreenready = function(element, id) {
	if (id == 'manage') {


on my 'manage' screen, I have the following 


<div data-bb-type="screen">
	<script id="manage" src="manage.js"></script>
	<center><div data-bb-type="title" data-bb-caption="manageScreen" ></div></center>
	<style type="text/css">
		body, html {
			background-color: White;
	<div id="results">
		<h1>Result should be here!</h1>


and on my manage.js, once fired from onscreenready, supposedly change the content of id="results" to something else via document.getElementById("results").innerHTML = ('Changed!');


But this are not the case. Value for the object is null. Am I not doing it correctly?

Posts: 214
Registered: ‎01-07-2011
My Device: Bold 9900
My Carrier: Rogers

Re: bbUI - bb.onscreenready : how to manipulate innerHTML?

Is this for Smartphone or Playbook?


Either way try putting the inializeDB() into a setTimeout() of a second and see if it works then. Not a solution a great solution, I am just wondering if the bb.onscreenready is firing off too early.

Rory (@roryboy)
Click "Accept as Solution" if post solved your original issue. Give like/thumbs up if you feel post is helpful
Posts: 60
Registered: ‎06-08-2011
My Device: n/a
My Carrier: n/a

Re: bbUI - bb.onscreenready : how to manipulate innerHTML?

Try to access it through the element object:


element.getElementById("results").innerHTML = ('Changed!');