03-10-2010 10:32 AM
I have a TextBox in a .html Widget page and I wants to accept only number in this TextBox field.
Works fime in the BlackBerry Browser with something like
But if I access to this webpage via a Widget the Number format don't works.
Somebody knows how is the method, property or .... for do this in a TextBox in a Widget?
Thanks in advance
03-10-2010 11:28 AM
From your post it looks like you are using some WAP formats. Have you tried the following as a common way used in HTML for limiting number only input.
03-10-2010 12:45 PM
Hi Tim thanks for your response,
just tested and i have the same problem with the widget TextBox
on Chome Browser work fine, only accepts numbers, but on the Widget accepts letters and numbers
03-10-2010 05:07 PM
Just have a function such as validateInput() that will be called onChange of the input. And inside the function ensure the user uses numbers only ^[0-9]*$
Kind of naive approach but it may work.
03-13-2010 08:12 AM - edited 03-13-2010 08:16 AM
After spending some time and did it some test, i think it's impossible to do a Numeric TextBox in a Widget
The best solution in the BlackBerry Browser it's with Wap format, because appears directly the numeric keyboard and no accept letters.
Very weird that we don't have a simple solution for this in Widget development ¿?
So if somebody have a solution like the Browser WAP format for Widgets are welcome.
03-15-2010 09:00 AM
<input type="text" style='-wap-input-format: "*N";' />
pretty simple. Beware, does not handle decimals...