I am investigating the use of the JEditable jQuery plugin for my asp.net site.
In my test, I setup a webservice to receive the callback from JEditable, but the webservice always returns XML, so the whole XML string gets thrown back into the page.
It appears that I have a few options, none of which I am thrilled about, so I wanted to post here to see if I am missing something and there is an easier way.
1) Instead of a web service, create an ASP.NET handler. Unfortunately, it means one url and passing all the params in post or querystring and having a big switch statement to determine what and where the JEditable call is coming from. The pro is that I can return exactly the string I want with no decoration
2a) Continue using the WebService. I like this because I can call different methods on the WebService and not have to write the "routing" code. But I'll need to use javascript to strip the XML from the return result. I've never written this sort of javascript code before... what's the approach? Are there specific API points I can use or do I have to use straight string manipulation.
2b) Somehow tell JEditable to send the request as JSON to the Web service, so that the result will come back JSON and I don't need to parse XML. Not really sure where to start here either. I am actually pretty surprised, as configurable as JEditable is, that there isn't an option to do JSON already. If it is there, I can't find it.
Any help or guidance would be appreciated.