Question

I have created the following code in JavaScript on a .cshtml page. This is an asynchronous call to the server to post new seat assignments.

$.ajax({url: '/tickets/update',
        data: { id: id, seat: seat },
        type: "POST",
        success: function(result) {
           // do something here           
        },
        error: function(result) {
           // do something here           
        }
     }); 

I believe this code is correct. But now I need confirmation from the server that the new seat assignment worked or not.

Our developer is asking me what I am expecting as a response. What do I tell him? And how do I process this in the JavaScript code?

And how does he have to program that. Do we use JSON for that?

Looking for a job?
JP/Morgan Chase
Dallas, Texas

Groundswell Cloud Solutions
Vancouver, Canada

Startup (stealth)
London, UK

Microsoft
Seattle


Related
When to use 'ref' and 'out' keywords - specifically with strings?