Folks,

To learn Ajax call, I'd like to create a very simple action. It wouldn't take any data, or return any data, it would only return success code. So far, I wrote this:

Code:
    public class ProjectController : Controller
    {

        // AJAX: /Project/Save
        public ActionResult Save()
        {
            System.Threading.Thread.Sleep(600);     // A bit of latency to make the Ajax call more visible to human eye.
            return new EmptyResult();
        }
    }
But I'm having problems with calling this from jQuery. The calling code:

Code:
    $("button[name='btnSaveProject']").click(function () {
        console.log("make ajax call");
        $.ajax({
            url: "/Project/Save",
            type: "GET",
            timeout: 8000,
            cache: false
        }).done(function () {
            console.log("ajax call successful");
        }).fail(function (jqXHR, textStatus) {
            console.log("something went awry. " + textStatus);
        });
    });
Unfortunately, .fail() gets called back.

Any suggestion, insight or reference is really appreciated!

Cheers,
- Nick