Alright, I have a simple form comprising of only a text field. Data written in the text field is stored in DB when we hit submit (Stored via ajax). The ajax wor
text field
Seems that your form is being submitted. Try preventing the default event (i.e. submission):
$("#submit_message").click(function(e) { e.preventDefault(); // This prevents form from being sumbitted // the rest of your code });