Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-27-2006, 06:05 PM   PM User | #1
ggi111
New Coder

 
Join Date: Apr 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
ggi111 is an unknown quantity at this point
string to num and num to string how?

hi,

string to num and num to string how?

thanks.
ggi111 is offline   Reply With Quote
Old 04-27-2006, 06:41 PM   PM User | #2
ggi111
New Coder

 
Join Date: Apr 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
ggi111 is an unknown quantity at this point
i mean-i have a variable with a string - "50px"

i mean-i have a variable with a string - "50px" and i want just the 50 in a variable which is no string...

how?
thanks..
ggi111 is offline   Reply With Quote
Old 04-27-2006, 06:47 PM   PM User | #3
nathan_lamothe
New Coder

 
Join Date: Apr 2006
Location: Joussard, Alberta
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
nathan_lamothe is an unknown quantity at this point
parseInt(variable) should strip the 50 from the px for you...

so
if oldvar='50px'

var newvar =parseInt(oldvar);

should work for you.
nathan_lamothe is offline   Reply With Quote
Old 04-29-2006, 01:48 PM   PM User | #4
ggi111
New Coder

 
Join Date: Apr 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
ggi111 is an unknown quantity at this point
thanks - where can I learn more on this specific function

thanks - where can I learn more on this specific function?
ggi111 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:07 AM.


Advertisement
Log in to turn off these ads.