Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> 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
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

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: 28.03.2024 - 13:15