I do the following for the client side to hide the control:
onClick event CSJS:
var clientID='#{javascript:getClientId("YOURCONTROLNAME")}';
if (document.getElementById(
).style.display=="none")
{
document.getElementById(
).style.display="block";
}
else{
document.getElementById(
).style.display="none";
};
And don't forget to
- set "escape=true" so that the getClientId gets computed.
- set "do not submit" option