I am trying to CFLOOP through a collection of URLs. The problem comes
from the fact that there are commas in some of the URLs. To illustrate
the problem, my code is as follows:

<CFSET URL1=
"http://www.foobar.com/selector/en/prodselect.asp?Xcntry=USA&Xlang=en_US
&error=novars">

<CFSET URL2=
"http://www.foobar.com/SRVS/CGI-BIN/WEBCGI.EXE?New,Kb=x_main_en,Company=
{7C4ED4E1-1DE9-46A0-BC3E-BE1C2FA9E9C9},varset=Xlang:en_US,varset=Xcntry:
USA,varset=prodID:DC220DC">

<cfloop index="ListOfURLs" list= "#URL1#, #URL2#">
        <cfoutput>
                #ListofUrls#
        </cfoutput>
<hr>
</cfloop>


THIS OUTPUTS THE FOLLOWING:

http://www.foobar.com/selector/en/prodselect.asp?Xcntry=USA&Xlang=en_US&;
error=novars
------------------------------------------------------------------------
--------
 http://www.foobar.com/SRVS/CGI-BIN/WEBCGI.EXE?New
------------------------------------------------------------------------
--------
Kb=x_main_en
------------------------------------------------------------------------
--------
Company={7C4ED4E1-1DE9-46A0-BC3E-BE1C2FA9E9C9}
------------------------------------------------------------------------
--------
varset=Xlang:en_US
------------------------------------------------------------------------
--------
varset=Xcntry:USA
------------------------------------------------------------------------
--------
varset=prodID:DC220DC
------------------------------------------------------------------------
--------


As you can see, the first URL outputs normally, but the second URL
breaks at every comma. Is there a way around this? I don't want to
insert Chr() codes if I can help it!
 

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to