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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
New Contributor
UHemaraju
Posts: 3
Registered: ‎02-27-2012
My Carrier: blackberry

Input Prompt in Blackberry playbook webworks

Hi every one,

 

I am developing an application using webworks for playbook....here i want to take value from input promt....but i dont no the sysntax to create a input promt....anybody please tell me the way to create this....

 

 

thanking you,

 

 

 

 

Please use plain text.
Super Contributor
SumiGhosh
Posts: 307
Registered: ‎09-20-2011
My Carrier: Vodafone

Re: Input Prompt in Blackberry playbook webworks

Anyway. What u meant by promt.............
Please use plain text.
Administrator
astanley
Posts: 1,140
Registered: ‎07-02-2009
My Carrier: Bell

Re: Input Prompt in Blackberry playbook webworks

You could use JavaScript's prompt method?

 

var result = prompt(" Hello ____ ", "World");
alert("Hello " + result + "?");

 However I'd suggest building your own modal popup, for which you have more control over the UI / style.  Frameworks like jQuery mobile have done a good job at providing developers with this sort of UI.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.

Watch the BlackBerry Jam Americas Sessions.
Please use plain text.
Developer
peardox
Posts: 746
Registered: ‎03-20-2011
My Carrier: 3, Orange, Vodafone

Re: Input Prompt in Blackberry playbook webworks

The easiest way to do this, as Adam says, is to use JQuery

 

Depending on the app you're writing you don't definitely need JQ Mobile

 

Just google JQuery, download and put it in your project

 

Once included you can use something as simple as this in your JavaScript...

 

fred = $('#target').val();

 

In your HTML you have to reference it like this for example...

 

<input type="text" id="target" />

 

Note the lack of the hash (#) in the JQuery vs the HTML - it's CSS syntax

 

You should play with JQuery - it's very good and supported by PB




Click the like button if you find my posts useful!
Please use plain text.
New Contributor
UHemaraju
Posts: 3
Registered: ‎02-27-2012
My Carrier: blackberry

Re: Input Prompt in Blackberry playbook webworks

hi,

 

 

Here promt means alert promt....

Please use plain text.
New Contributor
UHemaraju
Posts: 3
Registered: ‎02-27-2012
My Carrier: blackberry

Re: Input Prompt in Blackberry playbook webworks

oh sorry PROMPT
Please use plain text.