My code isn't straight qx as I use delphi for php but this works for me with
a text field


function LabeledEdit4JSKeyDown(event)
{

var event = event || window.event;
                var e = event;
                var unicode=e.getCharCode()? e.getCharCode() :
e.getKeyCode() ;
                if (unicode!=8){ //if the key is not the backspace key
(which we should allow)
                        if (unicode<48||unicode>57) //if not a number
                                {
                                 if (unicode<96||unicode>105)
e.preventDefault();//10 keypad numbers
                                }
                        }
               
}


-- 
View this message in context: 
http://www.nabble.com/How-to-allow-numbers-only-on-Text-Field-tp16318472p16320026.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

Reply via email to