ADDED JSON response handling & multiple input fields handling  & processing through jquery tmpl 

If you still maintain it, please have a look at the changes