Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][AJAX] błąd przy dużej ilości danych
SN@JPER^
post 13.08.2016, 22:43:47
Post #1





Grupa: Zarejestrowani
Postów: 266
Pomógł: 0
Dołączył: 4.01.2007
Skąd: Szczecin

Ostrzeżenie: (0%)
-----


Witam.

Dodając duży tekst via AJAX, wyskakuje niepowodzenie. Przy tekście kilku wyrazowym nie ma tego problemu.

  1. // show that something is loading
  2. $('#response').html("<b>Loading response...</b>");
  3.  
  4. /*
  5. * 'post_receiver.php' - where you will pass the form data
  6. * $(this).serialize() - to easily read form data
  7. * function(data){... - data contains the response from post_receiver.php
  8. */
  9. $.ajax({
  10. type: 'POST',
  11. url: 'post_receiver.php',
  12. data: $(this).serialize()
  13. })
  14. .done(function(data){
  15.  
  16. // show the response
  17. $('#response').html(data);
  18.  
  19. })
  20. .fail(function() {
  21.  
  22. // just in case posting your form failed
  23. alert( "Posting failed." );
  24.  
  25. });
  26.  
  27. // to prevent refreshing the whole page page
  28. return false;


Są jakieś ograniczenia co do wielkości danych?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 18.07.2025 - 00:39