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 Contributor
Posts: 3
Registered: ‎02-27-2012
My Device: playbook
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,

 

 

 

 

Developer
Posts: 435
Registered: ‎09-20-2011
My Device: Z10 LE, Playbook, DevAlpha C, 9900, 9380
My Carrier: Vodafone

Re: Input Prompt in Blackberry playbook webworks

Anyway. What u meant by promt.............
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
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.
Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
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!
New Contributor
Posts: 3
Registered: ‎02-27-2012
My Device: playbook
My Carrier: blackberry

Re: Input Prompt in Blackberry playbook webworks

hi,

 

 

Here promt means alert promt....

New Contributor
Posts: 3
Registered: ‎02-27-2012
My Device: playbook
My Carrier: blackberry

Re: Input Prompt in Blackberry playbook webworks

oh sorry PROMPT