JQuery Validation using Remote posts empty data to webservice
Posted
by user319721
on Stack Overflow
See other posts from Stack Overflow
or by user319721
Published on 2010-04-18T16:46:29Z
Indexed on
2010/04/18
16:53 UTC
Read the original article
Hit count: 246
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
© Stack Overflow or respective owner