Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 1) Is your problem only, where to put Ajax function? 2) Did you try adding it in a script tag at the end of the page? 3) Do you get any error? Commented Jun 21, 2015 at 8:20
  • Are you declaring formData somewhere? Commented Jun 21, 2015 at 8:22
  • not knowing where to put the function is just one problem, i did put it in a script tag at the end of the page. Commented Jun 21, 2015 at 8:29
  • i did not declare formData, but have amended the code (sorry, at one point i did have formData) Commented Jun 21, 2015 at 8:30
  • Please take a look at this question as well: stackoverflow.com/questions/12859942/… Commented Jun 21, 2015 at 8:41