In both chrome and IE, this code fails:
<script type="javascript">
var state = false;
function jsClicked(){
state = !state;
console.log("Clicked " + state);
}
</script>
<input id="jsClicked" name="jsClicked" type="checkbox" onclick="jsClicked()">
</input>
but changing the name of the onclick function resolves the issue. The error being thrown is:
Uncaught TypeError: object is not a function
Here's the fiddle: onclick error fiddle