I'm using ColdFusion to pull UK postcodes into an array for display on a Google Map. This happens dynamically from a SQL database, so the numbers can range from 1 to 100+
the script works great, however, in IE (groan) it decides to display one point way off line, over in California somewhere.
I fixed this issue in a previous webapp, this was due to the comma between each array item still being present at the end. Works fine in Firefox, Safari etc, but not IE.
But, that one was using a set 10 records, so was easy to fix.
I just need a little if statement to wrap around my comma to hide it when it hits the last record. I can't seem to get it right. Any tips/suggestions?
here is the line of code in question:
var address = [<cfloop query="getApplicant"><cfif getApplicant.dbHomePostCode GT ""><cfoutput>'#getApplicant.dbHomePostCode#',</cfoutput></cfif> </cfloop>];
Hopefully someone can help with this rather simple request. I'm just having a bad day at the office!