I have the following Function that is called through a OnClick
where it will delete the selected record.
But for security reasons, I would like to put a control to continue with the operation or not.
Follow the code below:
function DeletarLinha(id) {
var empresa = null;
var codigo = null;
var str = id.replace('d', '');
if (str.indexOf('_') > 0) {
var res = str.split("_");
codigo = (res[0]);
empresa = (res[1]);
//Alert de Confirmarção
//Caso for TRUE
//Executar essa function ConsultarPedido(codigo, empresa);
//Caso for Falso
//Apenas abortar o processo.
}
}