This is my current solution:
html
<input type="checkbox" value="1" onclick="return do_stuff();" />
<input type="checkbox" value="1" onclick="return do_stuff2();" />
javscript:
function do_stuff() {
return false;
}
function do_stuff2() {
return true;
}
I would like to avoid needing the "return" in the onclick call (ex. onclick="do_this();"
instead of onclick="return do_this();"
). I thought about using the preventDefault() function that jquery provides, but cant seem to get that working. Also, I dont want to bind "click" event if possible. I prefer using the "onclick". (easier to work with ajax loaded content)
Thoughts?