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()">
function zvalorPadrao(){
var elementExist = document.getElementsByName("CBX.internal")[0];
if(elementExist){
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["CBX.internal"].value=1;
document.forms["main_form"].elements["SET.alg.internal"].value =1;
}else{
document.forms["main_form"].elements["SET.alg.internal"].value =0;
document.forms["main_form"].elements["CBX.internal"].value=0;
}
}
Any suggestion?
Regards.