I'm writing some javascript that uses jQuery to make a webservice call.
- The webservice is one that I've written (in C#), so I have full control over it.
- The webservice is writing some values to a database.
- The web service is not on the same domain as the web site
- The web service takes a JSON.stringified parameter that contains all the values to commit
I have a couple of questions:
If the webservice throws an exception (e.g. primary key constraint) will this cause a jQuery Ajax exception?
If I want to return a value, say the number of rows affected, do I have to use JSONP (because it is cross-domain)?
Update: I have to support IE8, so CORS isn't an option. Thanks to @Volodymyr and @mcv for pointing out that option