AnsweredAssumed Answered

How can I make status_c readonly in edit view of notes when date_entered is populated?

Question asked by Navneet Golwalkar on Mar 28, 2014
Latest reply on Feb 15, 2017 by Andrew Gin
hello folks,

when a note is already created and i edit it so i want the status field should be readonly.....i tried a lot but i doesn't made any changes i wrote the code



$(document).ready(function(){     if(chd_team.search(curUser) != -1)
   {   
     document.getElementById('Notes_subpanel_save_button').disabled=true;
     if(case_status == "New")
     {
     document.getElementById("status_c").value = "Review";
     }
     if(case_status == "Review")
     {
     document.getElementById("status_c").value = "Review";
     }
     if(case_status == "Development")
     {
     document.getElementById("status_c").value = "Development";
     }
     if(case_status == "Solution")
     {
     document.getElementById("status_c").value = "Proposed_Solution";
     }
     if(case_status == "Test")
     {
     document.getElementById("status_c").value = "Test";
     }
     if(case_status == "Package")
     {
     document.getElementById("status_c").value = "Package";
     }
     if(case_status == "Package SSP")
     {
     document.getElementById("status_c").value = "Package_SSP";
     }
     if(case_status == "Ready for Release")
     {
     document.getElementById("status_c").value = "Ready_for_release";
     }
     if(case_status == "Closed")
     {
     document.getElementById("status_c").value = "Closed";
     }
     if(case_status == "On Hold")
     {
     document.getElementById("status_c").value = "OnHold";
     }
     if(case_status == "Escalated")
     {
     document.getElementById("status_c").value = "Escalated";
     }
     if(case_status == "Client to Verify Results")
     {
     document.getElementById("status_c").value = "CTV";
     }
     var date=document.getElementById("date_entered").value;
                 if(date.length>0)
    {
     var status = document.getElementById("status_c");
     status.readOnly = "readonly";
    }

it doesn't work i tried disabled="disabled" and disabled="true" but it also doesn't work 
please help me out it would be great help for me....thanks in advance

Outcomes