06-21-2012 07:20 PM
Got this in my head:
<meta name="viewport" content="initial-scale=1.0,width=device-width,user-scalable=no,target-densitydpi=device-dpi" /> <link rel="stylesheet" type="text/css" href="bbui-0.9.2.css"></link> <script type="text/javascript" src="bbui-0.9.2.js"></script> <script language="javascript" type="text/javascript"> bb.init();
I package the css and js with my app.
I got this in the html body:
<div data-bb-type="button" onclick="alert('click');" data-bb-style="stretch" id="plain">My Button</div>
Yet when I test the app it just shows the text My Button with no button around it to interact with.
What am I doing wrong or not including?
Solved! Go to Solution.
06-22-2012 03:13 AM
try
<INPUT TYPE="button" class="bb-bb10-button-dark" Value="My Button" onclick="alert('click')" >
06-22-2012 06:19 AM
I believe the step you are missing is to load your screen.
index.html
<html>
<head>
<meta name="viewport" content="initial-scale=1.0,width=device-width,user -scalable=no,target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="bbui-0.9.2.css"></link>
<script type="text/javascript" src="bbui-0.9.2.js"></script>
<script type="text/javascript">
bb.init();
</script>
</head>
<body onload="bb.pushScreen('menu.html', 'menu');">
</body>
</html>
menu.html (from the above example, this is a separate .html file, no <html> or <body> tags needed):
<div data-bb-type="screen" data-bb-title="Test App" data-bb-effect="fade">
<div data-bb-type="button" onclick="alert('click');" id="plain">My Button</div>
</div>
Let me know if that doesn't work.
06-22-2012 04:43 PM
Thanks. But I tried that. I get the button but it is above the other screen. I want the buttons on the screen that I have textboxs with etc.
06-22-2012 04:49 PM