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


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.


Reply
Highlighted
Contributor
Posts: 24
Registered: ‎03-19-2010
My Device: BB Z10
My Carrier: Vodafone UK

blackberry.ui.dialog.standardAsyncAsk issue

I have the need to display dialog boxes at several points in my app - mainly error messages - and have formatted the messages across multiple lines using \n. In a js alert box, this displays well yet when using blackberry.ui.dialog.standardasyncask the \n just gets displayed as "\n" rather than a new line. Any ideas?

 

My app is html5 and javascript.  Any ideas?

 

an example of the text to be displayed is:

 

"Welcome to <myapp> \n\nTo start using <myapp>, please first select the round you wish to shoot. \n\nOnce your have selected your round, simply click the 'Start Round' button. \n\n To score, either touch the appropriate area of the displayed target face or use the appropriate buttons. \n\nIf you have any issues, please do not hesitate to contact us."

Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: blackberry.ui.dialog.standardAsyncAsk issue

try using escape(text) before sending to the dialog

Nuno
Contributor
Posts: 24
Registered: ‎03-19-2010
My Device: BB Z10
My Carrier: Vodafone UK

Re: blackberry.ui.dialog.standardAsyncAsk issue

Thanks for the prompt reply nunodonato.  Unfortunately, using escape(text) just encodes a load of %20 where there is meant to be spaces within the text...

Contributor
Posts: 16
Registered: ‎01-05-2012
My Device: Playbook, Curve 9360
My Carrier: GP

Re: blackberry.ui.dialog.standardAsyncAsk issue

I think you cannot do this with standardAskAsync, it does not accept any control character, niether any html tag. You may use javascript alert with \n, but it does not look nice.

Contributor
Posts: 24
Registered: ‎03-19-2010
My Device: BB Z10
My Carrier: Vodafone UK

Re: blackberry.ui.dialog.standardAsyncAsk issue

Thanks Infoistic. I suspected this might be the case but was really hoping that someone would have come up with a workaround.