MVC Question: AJAX Methods!

Hello again!

Same MVC project. I answered my last question myself. Let’s see if any of you can help me with this one.

Below is some code. The save() method was pre-existing. I added the saveRanking() method. When I walk through the code, it hits the method, but then it just bails out of it. No exception (that I can see). Do I need that function(data) part? Is there a way to see why it didn’t try and execute it?

Thanks!


function save() {
	            $.post(
                "/Applications/SaveStatus",
                {
                    appPostId: $("#AppPostId").attr("value"),
                    statusId: $("#Status").val()
                },
                function(data) {
                    $("#sendResult").html(data);
                    $.post(
	                        "/Applications/LocationStatus",
	                        {
	                            Id: $("#ApplicationId").attr("value")
	                        },
	                        function(data) {
	                            $("#locationStatus").html(data);
	                            $("a.history").click(function() { showStatus(this.id.replace("apppost_", "")); return false; });
	                        });
                }
            );
            }

            function saveRanking() {
                $.post(
                    "/Applications/SaveRanking",
                    {
                        appPostId: $("#AppPostId").attr("value"),
                        ranking: $("#Ranking").val()
                    }
                );
            }

Looks more like a jquery question, but yes, you need the callback (function(data)) to see anything happen on the javascript side. Your action should still be executed though.