I am a worklight developer . I have a issue in the input tags . I want to read the value from a input tag whose type is number but whose entered text is symbols and numbers . Any way to solve this .
Asked
Active
Viewed 28 times
1
-
please share some relevant code. It is better if you can share jsfiddle link also. – Bhushan Kawadkar Nov 05 '14 at 06:59
-
What are you getting when you do document.getElementById("elementID").value ? – Vinod Jayachandran Nov 05 '14 at 07:00
-
@VinodJayachandran it is giving empty value when entering a symbol or text in the text box with a type number. If number is written it is working fine – Elayaraja Nov 05 '14 at 07:06
-
Are you sure that you cannot or do not want to use input `type="text"`? – JCOC611 Nov 05 '14 at 07:08
-
@JCOC611 yes i am sure, because the whole thing for mobile app. So if i am using a type=text the keyboard will be displayed. if type=number is being used num pad will be displayed and then this issue comes – Elayaraja Nov 05 '14 at 07:09
-
There *might* be a way to hack your way around this by setting `type="text"` *only* when reading the value with JavaScript, and set it back to number so that it works with your design constraint. However, it is only possible to know for sure if you release at least part of your code. – JCOC611 Nov 05 '14 at 07:11