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

Web and WebWorks Development

Reply
Developer
mikeo007
Posts: 28
Registered: ‎11-17-2009
My Device: 9900
Accepted Solution

bb.pushScreen parameter passing

I've looked at Tim's examples on GitHub, but I can't for the life of me figure out how to access the parameters I'm passing to the new screen.

 

I'm calling the bb.pushscreen properly:

 

bb.pushScreen('test.htm', 'testScreen', {testvar: '#0000FF'});

 And I can get a popup box to appear with the testvar value with the following:

 

bb.init({onscreenready : function(element, id, params) {
    if (id == 'testScreen') {
        alert(params.testvar);
        } 
        }});

But beyond that, I can't do anything with the value.

 

If for example I add (the testdiv element exists):

bb.init({onscreenready : function(element, id, params) {
    if (id == 'testScreen') {
        alert(params.testvar);
document.getElementById('testdiv').innerHTML = params.testvar; } }});

Does not produce any results beyond the popup box (the page doesn't even push).

 

Any ideas why this wouldn't work? 

Developer
mikeo007
Posts: 28
Registered: ‎11-17-2009
My Device: 9900

Re: bb.pushScreen parameter passing