I've always used generic function, but I'm having a problem retrieving the value of textarea
. I use a text editor in textarea
, the CkEditor .
Here is the function I'm using:
function sendPost(form, action, callback) {
ajaxRequest == null ? ajaxRequest = null : ajaxRequest.abort();
if (validateForm($("#" + form))) {
var msg;
alert($("#"+form).serialize());
//Utilizei esse alert acima, só para verificar como o POST está indo
ajaxRequest = $.post("crud/" + action + ".php", $("#" + form).serialize(),
function (data) {
dataFromAjaxRequest(data, callback);
});
} else {
$("#dialog_modal_mensagem").dialog("open");
}
}
The output of alert
:
titulo=teste&data=03%2F04%2F2014&texto=