Use jQuery Ajax Method in your code since you can put the alert inside the error area. This will hep you to easily find what is going wrong on your code.