so I have a dialog UI with a form once a user click on a link it opens. Once they click \"Add button\" it create a AJAX call that submits the data into the database. What I need
You have a typo:
windows.localtion.reload();
Should be
window.location.reload();