Sure: <cfoutput> <script> function checkBoxValidate(cb) { for (j = 0; j #query.recordcount#; j++) { if (eval("document.addCust.ckbox[" + j + "].checked") == true) { document.addCust.ckbox[j].checked = false; if (j == cb) { document.addCust.ckbox[j].checked = true; } } } } // End --> </script> </cfoutput>
On Tue, Feb 3, 2009 at 4:47 AM, Jason Congerton <ja...@jasoncongerton.co.uk>wrote: > > Hi > > I need to access a recordcount from within a javascript function, is this > possible? > > <script> > function checkBoxValidate(cb) { > for (j = 0; j < RECORD COUNT OF QUERY TO GO HERE; j++) { > if (eval("document.addCust.ckbox[" + j + "].checked") == true) { > document.addCust.ckbox[j].checked = false; > if (j == cb) { > document.addCust.ckbox[j].checked = true; > } > } > } > } > // End --> > </script> > > Jason > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318751 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4