Tevane
April 29, 2014, 8:57pm
1
Hello,
`
<input type=“checkbox” class=“filterCheck” name=“IT” onlick="#e vent.b uildLink( ‘SearchController.searchFilters’)#?IT=#rc.IT# " <cfif NOT structKeyExists(f orm, ‘fieldnames’) OR structKeyExists(f orm, ‘IT’)>checked=“checked” > Yes (#r c.ITSystems.RecordCount# )
`
When I clicked in the checkbox, the check appears, but no action took place. Am I doing something wrong with the code above?
Thank you!
Aaron
April 29, 2014, 9:22pm
2
first:
onlick="#e**vent.**
**should be onClick=""**
**second:**
**you'll have to handle the event with javascript.**
**look at the rendered output.**
Tevane
April 30, 2014, 5:10pm
3
Is there a reason why the event cannot be handle by the handler? I wanted to use the cold fusion data model…and not via JavaScript
Aaron
April 30, 2014, 5:15pm
4
i see. cfform might wrap up all that js for you.
from your example, it looks like it would render onClick="?event=my.event". that wouldnt do anything.
perhaps its rendering differently. is that so?
CFML is server-side. HTML/JavaScript is client-side. Once your CFML engine does its rendering, it is done and out of the picture. You cannot execute CFML from a browser event, because the browser is client-side and CFML is uninvolved. JavaScript is required in order to act upon a click, etc.