06-28-2012 05:34 AM
06-28-2012 06:01 AM
Please don't write duplicate posts...
06-28-2012 06:21 AM
06-28-2012 06:47 AM
ok...
where are you having problems? phone or PB?
06-28-2012 06:53 AM
Phone, I tried using the BBUi.js to make the 5 tabs, but it still reads it as 3
06-28-2012 06:59 AM
can you show the relevant piece of code and a screenshot of the buttons?
06-28-2012 07:13 AM
That is the javascript file
addEventListener('load',doInputLoad,false);
var addressTab = null;
var contactTab = null;
var phoneTab = null;
var somethingDeyTab = null;
var locationTab = null;
function doInputLoad() {
var items = document.getElementsByTagName('input');
for (var i = 0; i < items.length; i++) {
var element = items[i];
element.style.width = screen.width - element.offsetLeft - 50 + 'px';
}
// All the sections are visible to start off with so that the above
// size calculations work
var width = (screen.width - 20) + 'px';
addressTab = document.getElementById('news');
addressTab.style.width = width;
addressTab.style.display = 'none';
phoneTab = document.getElementById('ent');
phoneTab.style.width = width;
phoneTab.style.display = 'none';
contactTab = document.getElementById('home');
contactTab.style.width = width;
contactTab.style.display = 'none';
contactTab.style.display = 'inline';
somethingDeyTab=document.getElementById('something
somethingDeyTab.style.width = width;
somethingDeyTab.style.display = 'none';
locationTab=document.getElementById('location');
locationTab.style.width = width;
locationTab.style.display = 'none';
}
function selectLocation() {
phoneTab.style.display = 'none';
addressTab.style.display = 'none';
contactTab.style.display = 'none';
somethingDeyTab.style.display = 'none';
locationTab.style.display = 'inline';
}
function selectPhone() {
phoneTab.style.display = 'inline';
addressTab.style.display = 'none';
contactTab.style.display = 'none';
somethingDeyTab.style.display = 'none';
locationTab.style.display = 'none';
}
function selectAddress() {
addressTab.style.display = 'inline';
phoneTab.style.display = 'none';
contactTab.style.display = 'none';
somethingDeyTab.style.display = 'none';
locationTab.style.display = 'none';
}
function selectContact() {
addressTab.style.display = 'none';
phoneTab.style.display = 'none';
contactTab.style.display = 'inline';
somethingDeyTab.style.display = 'none';
locationTab.style.display = 'none';
}
function selectsomethingDey()
{
addressTab.style.display = 'none';
phoneTab.style.display = 'none';
contactTab.style.display = 'none';
somethingDeyTab.style.display = 'inline';
locationTab.style.display = 'none';
}
and this is the html
<body>
<div x-ww-type="screen">
<!--<div id="buttons" class="ww-pill-buttons">
<a id="btnContact" class="buttonLeft" onmouseover="doHover('btnContact')" onclick="selectContact();"><span>Contact</span></a
<a id="btnAddress" class="buttonMiddle" onmouseover="doHover('btnAddress')" onclick="selectAddress();"><span>Address</span></a
<a id="btnPhone" class="buttonRight" onmouseover="doHover('btnPhone')" onclick="selectPhone();"><span>Phone</span></a>
</div>-->
<div x-ww-type="pill-buttons">
<div x-ww-type="pill-button" x-ww-selected="true" onclick="selectContact();">Home</div>
<div x-ww-type="pill-button" onclick="selectAddress();">News</div>
<div x-ww-type="pill-button" onclick="selectPhone();">Entertainment</div>
<div x-ww-type="pill-button" onclick="selectsomethingDey();">Somethingdey</div>
<div x-ww-type="pill-button" onclick="selectLocation();">Location</div>
</div>
<div id="home" class="tab">
</div>
<div id="news" class="tab">
</div>
<div id="ent" class="tab">
</div>
<div id="somethingdey" class="tab">
</div>
<div id="location" class="tab">
</div>
</div>
</body>
06-28-2012 07:18 AM
that doesn't seem anything similar to bbUI.js
https://github.com/blackberry/bbUI.js/blob/master/
06-28-2012 07:28 AM
It is, i just changed a few Id names and removed the content i didn't need
06-28-2012 07:29 AM
perhaps you removed too much ![]()
couldn't look at the screenshot. can you upload it somewhere? imgur..