I've got this weird problem with my TinyMCE. I've made a FORM with the tinyMCE editor, no errors returned, works fine. But, when i make an ajax call, inserting some text into the database the text won't be placed in the database. However, if i click the button twice, the first row get's inserted without the text, and the second WITH the text.
Dose any one know why this happens? or have experience with it? maybe it's a common problem?
$('#newsWrite').submit(function() {
var testing = $('#newsWrite').serialize();
alert(testing);
$('#box_load').show();
$('#box_error').html('');
$('#box_ok').html('');
$.post('js/ajax/writeNews.php', $('#newsWrite').serialize(), function(data) {
alert(testing);
$('#box_load').hide();
if(data.error == 'false') {
$('#box_ok').append(data.errorMessage);
$('#box_ok').fadeIn();
}
if(data.error == 'true') {
$('#box_error').append(data.errorMessage);
$('#box_error').fadeIn();
}
},'json');
return false;
});