-1
Gentlemen(s)
I have a function that unlinks an inscription by Cpf, but when I pass a value that starts with zero by parameter the numbers are removed. I have tried almost everything to solve the problem, when I perform searches related to this subject, basically I only find how remove zeros and do not keep.
The input I’m storing Cpf is like "text".
Code in html
<button title="Deletar Inscrição" type="button" onclick="$('#ModalConfirmacao').modal('toggle');
$('#CpfSelecionado').val(@item.Inscricao.cpf_candidato);
$('#CursoSelecionado').val(@item.Inscricao.cd_curso);
$('#EdicaoSelecionada').val(@item.Inscricao.cd_edicao);">
<span class="fa fa-remove"></span>
</button>
Code js
function DesvincularInscricaoNovo() {
var cpf = document.getElementById('CpfSelecionado').value;
var curso = document.getElementById('CursoSelecionado').value;
var edicao = document.getElementById('EdicaoSelecionada').value;
$.ajax({
type: "POST",
url: urlPortal + 'DesvincularInscricao?cpf=' + cpf +
"&cursoId=" + curso +
"&edicaoId=" + edicao,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
if (!data.Error) {
$('#ModalSucesso').modal('toggle');
$('#textModal').empty().text(data.Mensagem);
//document.getElementById('inscricoesBody').deleteRow(document.getElementById('Cliquei').value);
}
}
});
}
Parameter passed: 00885355849
Value returned in function: 885355849
You want an answer or you want a kick. If you want an answer put the element whose
id
isCpfSelecionado
and all related code(events, validation, formatting, mask,...)– Augusto Vasques