Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> AJAX problem success
diamondking
post 3.03.2018, 10:55:28
Post #1





Grupa: Zarejestrowani
Postów: 100
Pomógł: 0
Dołączył: 7.02.2014

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


Witajcie mam taki kod:

  1. <script type="text/javascript">
  2. //Rejestracja
  3. $(document).ready(function() {
  4. $('.complain').on('click','[data-action="change"]', function(e) {
  5. e.preventDefault();
  6. var id = $(this).attr('data-id');
  7. $.ajax({
  8. url:"include/delcomment.php",
  9. method:"POST",
  10. data:{idnoti:id},
  11. dataType:"JSON",
  12. success: function(){
  13.  
  14. return $.notification.show('success','Usunięto komentarz');
  15.  
  16. }
  17. })
  18. });
  19. });
  20. </script>


Komentarz kasuje się poprawnie jednak nie wyświetla mi powiadomienia "return $.notification.show('success','Usunięto komentarz');"
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
viking
post 3.03.2018, 11:33:42
Post #2





Grupa: Zarejestrowani
Postów: 6 365
Pomógł: 1114
Dołączył: 30.08.2006

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


A po co robisz tam return?


--------------------
Go to the top of the page
+Quote Post

Posty w temacie
- diamondking   AJAX problem success   3.03.2018, 10:55:28
- - viking   A po co robisz tam return?   3.03.2018, 11:33:42


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: 26.04.2024 - 19:27