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
padrini
Posts: 19
Registered: ‎10-05-2012
My Device: Blackberry Dev Alpha C, Blackberry Z10 LE, Blackberry PlayBook
Accepted Solution

Pushscreen won´t push the screen

[ Edited ]

Hello all,

 

I am busy building a app, but now I have a problem with the Pushscreen.

My index and the first page will load, but then I give the user the choice to select the next week or settings.

The screen for next week will load normal, but the screen for settings won´t load. Have tried to rename it, to see if it was the name, but that won't solve the problem.

 

short version:

3 screens, first screen named schedule, second screen named settings, third screen named nextweek.

I can't go from screen 1 to the second screen, but I can to the third screen.

 

So how can I get from the first screen to the second one?

 

My code:

first screen action bar

    <div data-bb-type="action-bar">
        <div data-bb-type="action" data-bb-style="button" data-bb-img="images/icons/cog_dark_theme.png" onclick="bb.pushScreen('setting.htm', 'setting');">Settings</div>
<div data-bb-type="action" data-bb-style="button" data-bb-img="images/icons/next_dark_theme.png" onclick="bb.pushScreen('nextweek.htm','nextweek');">Next week</div> </div>

 setting(s).htm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<div data-bb-type="screen" data-bb-effect="fade">
	<!--<div data-bb-type="title" data-bb-caption="Edit Settings" data-bb-back-caption="Cancel" data-bb-action-caption="Save" onactionclick="alert('Save Clicked')"></div>-->
	
	<div data-bb-type="round-panel"> 
		<div data-bb-type="panel-header">Select Class</div>
		<div data-bb-type="label-control-container">
                    <div data-bb-type="row">
                        <select data-bb-label="Font Family">
                            <option value="bbalphasans" selected="true">INF1A</option>
                            <option value="arial">INF1B</option>
                            <option value="andalemono">INF1C</option>
                            <option value="arial">INF1D</option>
                        </select>
		   </div>
		</div>
	</div>
        
        <div data-bb-type="round-panel"> 
		<div data-bb-type="panel-header">Select Refresh time</div>
		<div data-bb-type="label-control-container">
                    <div data-bb-type="row">
                        <select data-bb-label="Font Family">
                            <option value="bbalphasans" selected="true">1 hour</option>
                            <option value="arial">2 hours</option>
                            <option value="andalemono">3 hours</option>
                            <option value="arial">4 hours</option>
                        </select>
		   </div>
		</div>
	</div>
        
</div>

 

Please click the like button if my post helped you! Thank you.
Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 620
Registered: ‎10-01-2009
My Device: Z10

Re: Pushscreen won´t push the screen

I notice that in your code, you're trying to push "setting.htm", but in your post you refer to it as "settings.htm"?

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
Developer
padrini
Posts: 19
Registered: ‎10-05-2012
My Device: Blackberry Dev Alpha C, Blackberry Z10 LE, Blackberry PlayBook

Re: Pushscreen won´t push the screen

I tried with both names, but I hasn't changed it back in the code.

I tried that because maybe settings was a name that was not supported (would be weird but you never know). I now also have edited my third screen nextweek, with the code of settings, but then he also won't push nextweek.
Please click the like button if my post helped you! Thank you.
Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 620
Registered: ‎10-01-2009
My Device: Z10

Re: Pushscreen won´t push the screen

Okay, I would suggest that you use Web Inspector to debug what's happening.  You may have a runtime error, or something else that's happening which could be easily caught by the debugging tool.

 

Using Web Inspector

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
Developer
padrini
Posts: 19
Registered: ‎10-05-2012
My Device: Blackberry Dev Alpha C, Blackberry Z10 LE, Blackberry PlayBook

Re: Pushscreen won´t push the screen

Thanks for the help, I'm going to try it with Web Inspector (first need to get it to the device, was doing everything in ripple), if I can't find it, I will post it.
Please click the like button if my post helped you! Thank you.
Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 620
Registered: ‎10-01-2009
My Device: Z10

Re: Pushscreen won´t push the screen

You can also use Chrome's built-in Web Inspector to debug things that aren't related to the device.  Just press CTRL-SHIFT-I at the same time

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
Developer
The_Anomaly
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: Pushscreen won´t push the screen

Web inspector will be your first step...  Also is there any javascript in your setting page?  Any javascript besides bbui in your index.html page?

If it helped you, click like. :smileyhappy:
Please use plain text.
Developer
padrini
Posts: 19
Registered: ‎10-05-2012
My Device: Blackberry Dev Alpha C, Blackberry Z10 LE, Blackberry PlayBook

Re: Pushscreen won´t push the screen

The error the console is showing:

 

  1. Uncaught TypeError: Cannot call method 'setAttribute' of undefined bbui-0.9.3.js:3154
    1. bb.labelControlContainers.applybbui-0.9.3.js:3154
    2. bb.initContainerbbui-0.9.3.js:255
    3. bb.loadScreenbbui-0.9.3.js:244
    4. bb.pushScreenbbui-0.9.3.js:490
    5.  
      The following is show when clicking number 6
      if (window.top.require) { window.top.require("ripple/bootstrap").inject(window, document); }

       


       

No there is not yet any javascript on the page, I am busy setting the app it's looks.

Please click the like button if my post helped you! Thank you.
Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 620
Registered: ‎10-01-2009
My Device: Z10

Re: Pushscreen won´t push the screen

Are you running the latest version of Ripple? 0.9.10? https://developer.blackberry.com/html5/downloads/fetch/ripple_ui.crx

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
Developer
padrini
Posts: 19
Registered: ‎10-05-2012
My Device: Blackberry Dev Alpha C, Blackberry Z10 LE, Blackberry PlayBook

Re: Pushscreen won´t push the screen

Yes I'm running version 0.9.10 of Ripple

Please click the like button if my post helped you! Thank you.
Please use plain text.