2
i made this function to send with jquery via post and have to get the value and text of select and one more 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 tbm.
opeta, would share the HTML code as well?
– Rubico
What is the criterion that people are using to negatively, the person who did it could post the reason here? It’s a completely valid question.
– Rubico