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
New Developer
Posts: 5
Registered: ‎03-24-2009
My Device: Not Specified
Accepted Solution

Blackberry Browser Examples?

Hi all. I'm pretty new to the Blackberry, I'm trying to do a fairly basic web page and have been struggling to get it to display the way I'd like ont he Blackberry. The first part is a toolbar constructed of a single row table, four cells, first two with button images, third with text, fourth with another image.

 

Looks fine and dandy in IE but on the Blackberry (9500) simulator it is all over, gap at the left before the first image, the image ont he right sticks over the end of the table and off the screen..

 

So.. can anyone suggest any nicely formatted pages that I could maybe use as a reference point for creating a decent looking template for my Blackberry pages? Is it really that tough? I'm not using anything fancy, really just basic HTML.

 

Any tips or guidance would be much appreciated.

 

Chris.

Highlighted
Guru I
Posts: 19,012
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Blackberry Browser Examples?

use http://validator.w3.org/ in order to see if your webpage is HTML-conform and HTML-valid.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
New Developer
Posts: 5
Registered: ‎03-24-2009
My Device: Not Specified

Re: Blackberry Browser Examples?

Oh my, 73 warnings! I guess I need to learn some discipline in my HTML, thanks a lot, I'll start reviewing..!!
New Developer
Posts: 5
Registered: ‎03-24-2009
My Device: Not Specified

Re: Blackberry Browser Examples?

Okay... so I ripped my page apart and got down to zero errors and zero warnings but... it looks like junk Smiley Happy

 

Can I really not use a width parameter on a TD tag?

 

align="center" doesn't seem to work...

 

I can't use nowrap? Really?!

 

What I find curios is if I put width="100%" in my table tag the table fills the page but, on the 8900 simulator at least, I get scroll bars - it makes the page bigger than the screen, would you expect that?

 

All I want is a single row table, four cells, the first two have image buttons and should be the size of the images, the third will be text and should use all available space, the last one another button, kid of liek this:

 

|BTN1|BTN2|          Page Title Here         |BTN3|

 

Any help appreciated!

 

Chris.

Guru I
Posts: 19,012
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Blackberry Browser Examples?

you can do all that but it's easier to use CSS for all format matters.
you can find CSS tutorials about that on the internet, because the specifications of CSS1 and CSS2 are a bit dry for a newbie.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
New Developer
Posts: 5
Registered: ‎03-24-2009
My Device: Not Specified

Re: Blackberry Browser Examples?

Thanks Xandrex, I had been trying to avoid CSS as I understood it has to be switched on per Blackberry so I've been using inline styles, I guess I should be able to accomplish the same thing. I just find it suprising that there aren't more examples out there, I am building for the iPhone and Blackberry in parallel and it is suprising that there are far more materials around for the iPhone already and practically nothing other than reference materials for the BB.

 

Live and learn, I really appreciate your help, thanks.

Guru I
Posts: 19,012
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Blackberry Browser Examples?

no you do not need to use a different CSS for each BlackBerry device.

the reason why there is not many material about the BlackBerry browser is that... for regular use, having a well formed webpage that is written correctly (using the regular state of the art webmastering) is enough.

for iphone users, they require a website that "looks like a website for iphones" so there are many things to do that.

if you want you can send us, or publish the current webpage, and I'll look into it for you.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
New Developer
Posts: 5
Registered: ‎03-24-2009
My Device: Not Specified

Re: Blackberry Browser Examples?

Thanks Xandrex. My desire is to present pages formatted to fit the device screen, rather than a well formed web page that can be used by all. For example if I am displaying a chart I'd like it to fill the screen of the device you are using, as such I'm thinking I should detect the device and prepare content appropriately.

 

For example I understand some BB's have a 320x240 screen, as such I'd probably want to display an image that is say 300x200 to allow for the header. If you have a BB that will do a different resolution then I'd like to display appropriately. This doesn't look like it'll be too tricky for the standard devices as I should be able to determine the resolution from the device name in the user-agent header, correct?

 

In the case of the newer touch screen units however that allow for rotation do you know if it is possible to:

a) Capture the current resolution, which will vary by rotation.

b) Capture the rotate event such that I can jump to another page that displays more appropriate content?

 

In comparison to the iPhone the browser has events that are triggered when the device is rotated and these can be intercepted to manipulate the display.

 

Chris.

Guru I
Posts: 19,012
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: Blackberry Browser Examples?

okay I understand. All that is possible, I think I saw all that in the BlackBerry Browser big PDF reference file, but it was a long time ago.

not sure about the rotation thing on the Storm, though.



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
New Developer
Posts: 2
Registered: ‎04-02-2009
My Device: Storm 9530

Re: Blackberry Browser Examples?

Yes, there is an event you can capture indicating the orientation of the device (e.g. Storm)... check the BB Developer site Knowledge Base.