Xurion Posted October 1, 2007 Share Posted October 1, 2007 I used the search but couldn't find anything to do with exactly what I need. I have three text fields on a form. These three fields are: 1. Sub Total Price (Enabled) 2. 4% Surplus of Sub Total (Disabled) 3. Total (Disabled) This form needs to allow the user to edit the sub total price, and with some simple JS I have made the other fields adjust accordingly. Now there is no validation in JS to prevent a user inputting an alpha character like 'aaa' and the returned values from the simple JS that I mentioned before are simply 'NaN' as you would expect. What I am looking for is a way to make an input textfield numerical only; the field should only accept the input of numerical characters. Thanks in advance. Xur~ Quote Link to comment https://forums.phpfreaks.com/topic/71381-creating-a-number-only-text-field/ Share on other sites More sharing options...
wildteen88 Posted October 1, 2007 Share Posted October 1, 2007 Quick search on google returned this. Woking example included. Seems to be what you're after. Quote Link to comment https://forums.phpfreaks.com/topic/71381-creating-a-number-only-text-field/#findComment-359315 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.