I am using ColdFusion to pull UK postcodes into an array for display on a Google map. This comes dynamically from an SQL database, so numbers can range from 1 to 100 +
The script works fine, however in IE (moan) it decides to display one point from the line, somewhere in California.
I fixed this problem in a previous webapp, it was connected with a comma between each element of the array that is still present at the end. Works fine in Firefox, Safari, etc., but not in IE.
But that one used 10 records, so it was easy to fix.
I just need a little bit for the operator to wrap my comma to hide it when it gets to the last entry. I don't seem to understand. 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>];
Hope someone can help with this rather simple request. I just have a bad day at the office!
source share