Not sure why....here's what I did
I have a checkbox component and I gave it a control ID of 'blah' no quotes.
I have a textbox component and I gave it the control ID of 'yadda' no quotes.
On the checkbox component I added a AttributeKeyValuePair custom event to the Custom Events in Functionality / Behavior, set it to 'onclick' and in the event handler window I typed:
//BEGIN SCRIPT
var textbox = document.getElementById('yadda');
var checkbox = document.getElementById('blah');
if(!checkbox.checked)
{
textbox.value = "";
}
//END SCRIPT
I also checked of the 'Post Form on Value Change' checkbox but it did not clear the textbox variable?
I managed to find a way to clear the variable using a match component in a visible dynamic model that uses a initialize variable component depending on the value of a dropdown list but cannot figure out how to do the same using the value of a checkbox? Does a checkbox not return a value of either true or false?