|
|
#1 |
|
Fully Optimized
Join Date: Oct 2008
Posts: 2,345
|
Alright what I am trying to do is spit a string.
original string is: 1-F-2-F-3-F-4 How many a user specifies so say they want two. Splits to: 1,2 or say they want 3 How many a user specifies so say they want three. Splits to: 1,2,3 Here is the tricky part. I would like to send back a Code:
document.getElementById(id).style.color="#FFF"; See the var id would be the split string numbers. How can I do this? I know you can do this in PHP easy, but I have to have this part client side. Aka handy dandy JavaScript. For any help I get here is a thank you in advance. Thank you! |
|
|
|
|
|
#2 |
|
Fully Optimized
Join Date: Oct 2008
Posts: 2,345
|
Alright so I changed the join character I used to " ". So now it strings off as 1 2 3 4.. etc.
So what I need to know is there a way I can tell JavaScript to take individual numbers one at a time in say a while or for statement? Such as the strtok() from php. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|