Dodając duży tekst via AJAX, wyskakuje niepowodzenie. Przy tekście kilku wyrazowym nie ma tego problemu.
// show that something is loading /* * 'post_receiver.php' - where you will pass the form data * $(this).serialize() - to easily read form data * function(data){... - data contains the response from post_receiver.php */ $.ajax({ type: 'POST', url: 'post_receiver.php', data: $(this).serialize() }) .done(function(data){ // show the response $('#response').html(data); }) .fail(function() { // just in case posting your form failed alert( "Posting failed." ); }); // to prevent refreshing the whole page page return false;
Są jakieś ograniczenia co do wielkości danych?