I have a setTimeout function which basically sets a timer for displaying an AJAX message, and whether the message is an alert-success it redirects to a certain page
setTimeout