3
I have a javascript function that has an AJAX code inside it. I want to pass the javascript values to AJAX, follow the code:
function validarCamposComprar() {
var campoNomeEmpresa = document.getElementById('fTxtCadastroNomeEmpresa');
var campoNomeAdmin = document.getElementById('fTxtCadastroNomeAdmin');
$.ajax({
type: "POST",
url: "email.php",
data: { meuParametro1: campoNomeEmpresa, meuParametro2: campoNomeAdmin },
complete: function (data) {
// (...)
}
});
return true;
}
It’s possible to do this, which I’m missing?
This ai @paulojean, I tidied up in my reply, I had not noticed it.
– Giancarlo Abel Giulian