index.php changed on its own

You site has been infected with malware. It will take some effort to clean it up, but it can be done. Basic steps are available via searching, and are out of scope for here, but to get started: Update WP core to latest, even if it already is. Update all themes and plugins. Remove plugins … Read more

using AJAX [object Object]

These lines are responsible for the alert: success: function(data) { window.alert(data); }, error: function(errorThrown){ window.alert(errorThrown); } In the first block, success, the callback function is executed if the ajax request succeded. The second block, error, will run if the request returned an error. Right now in both cases an alert is triggered via window.alert() function … Read more