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
Contributor
MRT502
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."

Please use plain text.
Developer
nunodonato
Posts: 313
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
theBBthing.wordpress.com - my BlackBerry development blog: news, tips and tutorials
bitoutsidethebox.com - re-imagining digital solutions


Please use plain text.
Contributor
MRT502
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...

Please use plain text.
Contributor
Infoistic
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.

Please use plain text.
Contributor
MRT502
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.
Please use plain text.