mercredi 17 juin 2020

When Checkbox is selected particular columns should be enabled

I have tried few examples to enable particular columns(text box,check box) alone when checkbox is checked.But nothing is working.I have included my code here

function enable() 
{

    if (document.getElementById("MaincheckboxId").checked == true)
    {
        document.getElementById("column1Id").disabled = false;
        document.getElementById("column2id").disabled = false;
        document.getElementById("subcheckboxId").disabled = true;

    }
}

Here, when Main Checkbox is checked, column 1 and Column 2 should be enabled. Sub Checkbox should be disbaled.Please let me know what am i missing.




Aucun commentaire:

Enregistrer un commentaire