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
Highlighted
Developer
Posts: 219
Registered: ‎11-05-2011
My Device: Z10
My Carrier: Beeline
Accepted Solution

How to pass params to the next screen from previous screen in BBUI.js

Hash or ?query=params don't working

 

How I can pass params to the next screen like search query or #hash?

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

Re: How to pass params to the next screen from previous screen in BBUI.js

You could setup a variable on index.html

 

var query = 3333;

 Then on your screen page set the variable you created to the value you want to pass before changing screens

query = 4444;
bb.pushScreen('mypage.htm', 'mypagename');

 You can then have access to the 'query' varibable on the next page and do whatever processing it was you need to do

--
Rory (@roryboy)
Click "Accept as Solution" if post solved your original issue. Give like/thumbs up if you feel post is helpful
Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: How to pass params to the next screen from previous screen in BBUI.js

I use sessionStorage to do that.

Just because its more extra-work to type than global variables, which is to remind me that I shouldn't use it unless I really have to. Careful with those global variables Smiley Wink

Nuno