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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Contributor
Posts: 4
Registered: ‎12-19-2012
My Device: Blackberry bold 9780
My Carrier: Airtel

How to centralize data in HTML 5?



How to manage data in HTML5? How to centralize the data using HTML 5?

Posts: 12
Registered: ‎12-18-2012
My Device: Developer
My Carrier: O2

Re: How to centralize data in HTML 5?

Horizontal centre is easy enough. For text you can use "text-align:center" , and for other things you can make the margin on each side the same or set to "auto" .


To centre things vertically is more difficult. If it is a table cell, you can use "vertical-align:middle" . For other things you can use absolute positioning. Read THIS for more methods.


All this information is to be used as CSS/with the <style> tag.


Hope I helped.

New Contributor
Posts: 4
Registered: ‎12-19-2012
My Device: Blackberry bold 9780
My Carrier: Airtel

Re: How to centralize data in HTML 5?

Centralize data means centralizing the database for all the users using the same application.

Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi

Re: How to centralize data in HTML 5?

Reposting my answer since this thread is probably more relavent then the copy that was posted in the 'Built for BlackBerry thread'.

You could use arrays for your data and then save them to localstorage. 






items = [{
name: "potion",
amount: "5",
weight: "5lb."
name: "sword",
amount: "1",
weight: "20lb."


You have to stringify to save it to localstorage. 




Then when you want to load the localStorage back into your script you have to parse it.


items = JSON.parse(localStorage["items"]);


co-founder of Diaree | BB Dev for PictureThis
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: How to centralize data in HTML 5?

Am I the only that thinks you're talking about centralizing it online maybe?


When I read your question I thought of using a web service or a server to do this...  You could use an existing API in the language of your choice, like PHP or even .NET WCF.


That way you users can connect with the app to a centralized database.  Problem will be whether they all have 3G or GPRS connection to connect.

If it helped you, click like. Smiley Happy