AnsweredAssumed Answered

How to check edit form on detail_alg form

Question asked by FelipeVACS on Nov 27, 2017
Latest reply on Nov 28, 2017 by FelipeVACS

I did a javascript code for set the default value internal flag as true, but i have a problem. When i'm going to edit the comment the flag is always true, because i can not check if is edit comment or new comment.
I tryed use _dtl.edit check, but don't works.


The zvalorPadrao() method is call in body onload


<body class="detailro" onload="loadActions();call_def_last_alg();zvalorPadrao()" onunload="unloadActions()">



//Show for user that field is checked
function zvalorPadrao(){
     var elementExist =  document.getElementsByName("CBX.internal")[0];
        // Here I must check if It's edit form too
     document.getElementsByName("CBX.internal")[0].checked = true;

function zCbxVerificaValor(internalChecked){
     var isChecked = internalChecked;
          if(isChecked && document.forms["main_form"].elements["SET.alg.internal"]){
               document.forms["main_form"].elements["SET.alg.internal"].value =1;
               document.forms["main_form"].elements["SET.alg.internal"].value =0;


Any suggestion?