|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
So i have a textarea that is 5 cols wide and 20 rows long. Users are to copy and paste a list of numbers from an excel sheet into the textarea.
The column in the excel sheet either has a 5 digit number in it, or blank spaces, so the user will invariably copy & paste numbers with spaces. For the life of me I cannot remove the blank spaces on submit: thenumbers = 12345 54321 98765 This is what the source looks like if you output to an html page: 12345 54321 98765 what I get after turning it into a list: newlist = 12345,,54321,98765 I have tried everything to get rid of that extra space. Well, I don't even know what it is because i can't seem to get rid of it. Heellllp! |
|
#2
|
|||
|
|||
|
<cfset ls1 = "12345, ,54321,98765">
<cfset pos1 = ListContains(ls1, " ")> <cfset ls1 = ListDeleteAt(ls1, pos1)> <cfoutput>ls1: #ls1#</cfoutput> |
|
#3
|
|||
|
|||
|
Or just:
<cfset ls1 = "12345, ,54321,98765" /> <cfset ls1 = replace( ls1, ' ', '', 'All' ) />
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#4
|
|||
|
|||
|
Thanks
Thanks for all the help.
I can't believe I missed such a simple thing... cheers! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > textarea giving me a huge headache! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|