Acces a record count in javascript

2009-02-03 Thread Jason Congerton
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 ==

Re: Acces a record count in javascript

2009-02-03 Thread Francois Levesque
Hi Jason, If your javascript block is within cfoutput tags, you can just put #myquery.recordcount# in there. Francois Levesque http://blog.critical-web.com/ On Tue, Feb 3, 2009 at 5:47 AM, Jason Congerton ja...@jasoncongerton.co.ukwrote: Hi I need to access a recordcount from within a

Re: Acces a record count in javascript

2009-02-03 Thread John M Bliss
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 --

Re: Acces a record count in javascript

2009-02-03 Thread Patrick Santora
Jason, It's important to remember that Javascript is commonly rendered AFTER Coldfusion has compiled the page. This allows you to use Coldfusion to help render such content. Here is a basic request cycle to help show this: Client makes request - Server proccess request (Coldfusion) - Server

Re: Acces a record count in javascript

2009-02-03 Thread Jason Congerton
Hi Thanks to you all, I was just missing the cfoutput tags! Thanks!! Jason, It's important to remember that Javascript is commonly rendered AFTER Coldfusion has compiled the page. This allows you to use Coldfusion to help render such content. Here is a basic request cycle to help show this: