Hi GuysI am using the following script to pull in 10 UK postcodes into my page:<%sqlStrB = "Select TOP 10 * from postcodetable" oRsBJ.Open sqlStrB, oDBConn If oRsBJ.eof then%>Sorry there are no postcodes<% Else %>---<% Do while not oRsBJ.eof postcode = oRsBJ("postcode") %><%=postcode%><% oRsBJ.MoveNext loop %>---<% End If %><%oRsBJ.closeset oRsBJ = nothing%>This works just fine. However, I want to pull in these postcodes into the following peice of javascript:<script type="text/javascript">var locations = [ 'POSTCODE, UK', ];</script>
So, if my query returns 3 postcodes then the javascript script would look like:<script type="text/javascript">var locations = [ 'LU4 9LT, UK', 'HP2 5UY, UK', 'WD2 6TF, UK', ];</script>
How do I insert all the postcode from my query into the javascript in the format above?Any help would be fully appreciatedBest regardsRod from the UK