JQuery Validation using Remote posts empty data to webservice
- by user319721
I'm using the JQuery Validation plugin. I'm using the remote option to make a call to my webservice to check if a company name exists. The webservice only accepts JSON data.
I pass the data to the webservice from the Company Input Field in my Form as follows:
data: "{'company': '" + $('#Company').val() + "'}"
But this always returns a blank value for company so the response is {'company':''} i.e. correct JSON but missing the Company Input Field value.
Can anyone shed some light on why I always get a blank value here?
Thanks for the help,
Ciaran