I am creating an application that, among other fields, uses two checkboxes. If the first checkbox is checked, the second checkbox is visible (or enabled). If the first checkbox is unchecked, the second checkbox is invisible (or disabled). The first checkbox is bound to a datatable field. The second checkbox is a virtual field type.
I've tried everything I can think-of, but I can't make the second checkbox disappear or disable it. I tried modifying the JavaScript code on the Caspio Website that is supposed to disable a second drop-down list based on the first drop-down's selection - it didn't work either.
My latest (and leanest) script is below. Can anyone out there help me with this?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
sferraro
Hi...
I am creating an application that, among other fields, uses two checkboxes. If the first checkbox is checked, the second checkbox is visible (or enabled). If the first checkbox is unchecked, the second checkbox is invisible (or disabled). The first checkbox is bound to a datatable field. The second checkbox is a virtual field type.
I've tried everything I can think-of, but I can't make the second checkbox disappear or disable it. I tried modifying the JavaScript code on the Caspio Website that is supposed to disable a second drop-down list based on the first drop-down's selection - it didn't work either.
My latest (and leanest) script is below. Can anyone out there help me with this?
function hideit()
{
if(document.forms.caspioform.Dependent_Coverage.checked==true)
{
document.forms.caspioform.Virtual1.style.visibility='hidden';
} else {
document.forms.caspioform.Virtual1.style.visibility='visible';
}
}
onload=hideit;
document.forms.caspioform.Dependent_Coverage.onchange=hideit;
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.