rendering cfgrid through js
i have a html cfgrid that should be populated by a cfc
to the cfc i'm passing 4 column names and a string (as form field values)
this works fine with a cfinvoke, when page loads first. but now i want to be able to pass different values to cfc and reload my grid with the new values.
i've created a proxy <cfajaxproxy cfc="repfunc" jsclassname="rproxy" />
created a js function:
function srcCxReqs(srcReqs,f1,f2,f3,f4) {
var instance = new rproxy();
instance.srcCxReqs(srcReqs,f1,f2,f3,f4);
ColdFusion.Grid.refresh('testgrid');
}
created a button that collects (correctly) the values to pass and calls the js function:
<button name="getReqs" onClick="srcCxReqs(getElementById('srcReqs').value, getElementById('f1').options[f1.selectedIndex].value, getElementById('f2').options[f2.selectedIndex].value, getElementById('f3').options[f3.selectedIndex].value, getElementById('f4').options[f4.selectedIndex].value)">
<cfgrid name="testgrid" format="html" query="cxReqs"></cfgrid>
but when i try it, get "Exception thrown and not caught, cfajax.js, Code:0
i'm not even sure the cfajaxproxy is the right way to do it.
does anybody have a working example of a cfgrid being renedered again by a js function?
thanks
