Welcome to the CrackBerry Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 4 of 4
Like Tree2Likes
  • 1 Post By Bla1ze
  • 1 Post By chadtatro
  1. mikeo007's Avatar
    CrackBerry Genius

    Posts
    4,219 Posts
    Global Posts
    4,921 Global Posts
    Thread AuthorThread Author   #1  

    Default Looking for specific webworks sample (bb.pushscreen)

    I've scoured the github, but I can't find a decent sample of bb.pushscreen (part of bbui.js).

    Specifically, I'm looking for info on passing parameters. Tim Neil posted a sample that will pass a variable and display it in a popup box from bb.init. But I can't find a way to access these parameters outside of bb.init.

    Anyone have any experience with this?
    Go get some apps!
    DocuShortcut - Free homescreen shortcuts(Built For BlackBerry)
    Symptom Journal - Track medical symptoms and causes (Built For BlackBerry)
    SkinEd for Minecraft - Create and share Minecraft skins
  2. Bla1ze's Avatar
    Editor in Chief

    Posts
    11,966 Posts
    Global Posts
    12,205 Global Posts
    #2  

    Default

    I have no idea but I tweeted this thread for you in case someone will see it and offer up some help.
    Answers are easy. It's asking the right questions which is hard. - The Doctor

    [ Mobile Nations Sites: Android, iOS, Windows Phone, BlackBerry, Connectedly]
    Thanked by:
    mikeo007 (01-14-2013) 
    mikeo007 likes this.
  3. chadtatro's Avatar
    CrackBerry Newbie

    Posts
    1 Posts
    #3  

    Default

    Hey Mike,

    So here's one way that you can do this (I'm not at a computer I can test this on, but it *should* work. If not let me know)

    When you do pushScreen you can specify a 3rd optional parameter, as you already know.

    Code:
    bb.pushScreen('thePage.html', 'theID', 'myParams');
    You're correct that you have to read this 3rd param inside the bb.init method. You should be able to set this as a global variable from there however, like so...

    Code:
    bb.init({
        onscreenready: function(element, id) {
        },
    
        ondomready: function(element, id, params) {
            console.log('html page: ' + element);
            console.log('id: ' + id);
            console.log('params: ' + params);
    
            // set params as a global variable so you can access it from wherevs...
            myPageParams = params;
        }
    });
    ---
    Chad Tetreault (@chadtatro)
    Developer Relations @ RIM (HTML5/WebWorks)
    Thanked by:
    mikeo007 (01-14-2013) 
    mikeo007 likes this.
  4. mikeo007's Avatar
    CrackBerry Genius

    Posts
    4,219 Posts
    Global Posts
    4,921 Global Posts
    Thread AuthorThread Author   #4  

    Default

    Perfect!
    Thanks Bla1ze and Chad, this is exactly what I was looking for!

    If anyone else turns up this topic during a search, I also found some more useful info about bb.init here: Using bbUI's onscreenready and ondomready to Dynamically Change Your HTML

Similar Threads

  1. Looking for specific app
    By shedrock in forum BlackBerry OS Apps
    Replies: 10
    Last Post: 07-15-2009, 06:05 AM
  2. Looking for specific game
    By BBA in forum Storm 3rd Party Apps
    Replies: 1
    Last Post: 05-06-2009, 05:22 AM
  3. Looking For Specific Wallpapers...
    By ucsdgirl04 in forum BBOS Wallpapers
    Replies: 11
    Last Post: 12-16-2008, 06:49 PM
  4. looking for specific Bold background
    By deuceap610 in forum BlackBerry Bold 9000
    Replies: 1
    Last Post: 11-04-2008, 07:22 PM
  5. Looking for specific TODAY theme criteria - Have SEARCHED!
    By jbradley2093 in forum BlackBerry Curve 83xx Themes
    Replies: 7
    Last Post: 08-31-2008, 07:42 PM

Posting Permissions