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.

Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Pass parameters to another page failed

As an example you can get the latest from the samples directory from the bbUI repo and modify the following


index.htm - add the following code to the ondomready function


if (params) { 
alert('foo = ' + params.foo);


js/dataOnTheFly.js - Modify the dataOnTheFly_addListItem() function to look like the code below


function dataOnTheFly_addListItem() {
	var listItem, container, dataList = document.getElementById('dataList'),
		data = {'foo': 'bar'};
	// Create our list item
	listItem = document.createElement('div');
	listItem.data = data;
	listItem.setAttribute('data-bb-type', 'item');
	listItem.setAttribute('data-bb-img', 'images/icons/icon11.png');
	listItem.setAttribute('data-bb-title', 'Title ');
	listItem.innerHTML = 'My description';
	listItem.onclick = function() {
		bb.pushScreen('grid.htm', 'grid', listItem.data);
	// Append the item


Now when you open this page (shown on the main menu as "Load Data After Showing") in the sample app and click on one of the generated list items it will open the grid list screen and the ondomready function will do an alert with the text "foo = bar"


I just tested it out and it works


Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Trusted Contributor
Posts: 100
Registered: ‎03-31-2012
My Device: Blackberry 9780
My Carrier: Telkomsel

Re: Pass parameters to another page failed

It's works........Smiley Happy

Thanks for your help...I really appreciate it....