|
-
Mar 24th, 2003, 10:16 AM
#1
Thread Starter
Member
String to Numeric
Hi all
How can i convert a string from a textbox to a numeric value?
Thanks!
-
Mar 24th, 2003, 10:27 AM
#2
Are you talking about JavaScript?
In which case you have to remember JS doesn't really have proper datatypes.
Whatever you first initialise a var it will take the type of whatever it is you used to initialise it with.
There are however two functions
Code:
num = parseInt(textbox.value);
num = parseFloat(textbox.value);
-
Mar 24th, 2003, 10:44 AM
#3
Thread Starter
Member
thanks a lot .. it helped me enough!
-
Mar 28th, 2003, 04:38 AM
#4
Thread Starter
Member
Hi again.. and now.. how can i convert a numeric to a string ?
Thanks!
-
Mar 28th, 2003, 04:56 AM
#5
See your "length of value" thread
-
Mar 28th, 2003, 05:09 AM
#6
Thread Starter
Member
Yes.. I already saw it! Thanks.. I have another question for you.. see the other thread again.
-
Mar 28th, 2003, 05:11 AM
#7
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|