Skip to content
Advertisement

Page Reloading after data update using AJAX & also ALERT not showing after data update

I am trying to update some data in using PHP & AJAX but my alert is not showing. In function(response) i am getting “success” message from PHP file. Please advise

JavaScript

———- MY AJAX SCRIPT ———-

JavaScript

Advertisement

Answer

You need to check Network tab in your browser and ensure you have 200+ HTTP code when AJAX produced, otherwise you won’t reach success callback. Also, you can add error callback and do some console.log. This might give you some clue what is happening:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement