Add ajax on error, update ajax on success
Merge pull request #22 from gary1410/ajax-errors

Add ajax on error, update ajax on success