02-27-2012 07:09 AM
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....
02-27-2012 09:56 AM
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.
02-27-2012 01:25 PM
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
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