I made this function to send with jquery via post and I have to get the value and the text of the select and another value of an input type text. Follow the code below
function SalvarRegistro(){
$(this).ready(function(){
var cursodisciplina_id = $("#disciplina option:selected").val();
var descricao = $("#disciplina option:selected").text();
var link = $("#link").val();
var usuario_lancamento = $("#usuario_lancamento").val();
var adicionar = 1;
$.ajax({
type: "POST",
dataType: "json",
url: "cursodisciplinaemena_acao.php",
data: {cursodisciplina_id: +cursodisciplina_id, descricao: +descricao, link: +link, usuario_lancamento: +usuario_lancamento, adicionar: +adicionar},
success: function(data) {
alert(data[0].msg);
},
failure: function() {
alert("Ocorreu um erro, tente novamente!");
}
});
});
return true;
}
the cursodisciplina_id is going and the user_calling tbm, plus the text of the select and the link that is an input type text are not going to get the NaN value by firebug, I do not know what else to do.