Hi,
I am trying to block the user entering non-number data on a number field.
var yearsField = new qx.ui.form.TextField();
yearsField .setLiveUpdate(true);
var validator_int = qx.ui.form.TextField.createRegExpValidator(new
RegExp('^(0|[1-9][0-9]*)$'));
yearsField .setValidator(validator_int);
yearsField .addEventListener("keyup", function(evt) {
//What should I put here so when the user types junk characters let's say
'A', we don't want to let it go the Text Filed value. We want to disable
that
?????
});
Some farms don't let you type bad data at all. They let you type numbers
only. I don't want to give a second chance to validate it and alert the user
that the data is bad. I want to stop upfont.
How can I achieve it using Qooxdoo?
Thanks.
Kanugula.
--
View this message in context:
http://www.nabble.com/How-to-allow-numbers-only-on-Text-Field-tp16318472p16318472.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel