cfloop breaks javascript
I've been using a spry validation text field to check that the user is entering a numeric character, I've used it on other pages to loop through a series of checkboxes that are populated using a cfquery but on one page I need to cfloop through an array but the first part of the cfloop is breaking the javascript, the code is below, any suggestions would be appreciated or is there another way of achieving the same result.
<cfloop from="1" to="#ArrayLen(session.cart)#" index="i">
<script type="text/javascript">
<!--
var sprytextfield#session.cart.productID# = new Spry.Widget.ValidationTextField("sprytextfield#session.cart.productID#", "integer", {validateOn:["change"], minValue:1});
//-->
</script>
</cfloop>
