user feedback after success ajax fails

user feedback after success ajax fails

I'm so happy my jquery is dispatching a serverside script (ajax) and it is working I have verified in the database. Now I would like to provide some feedback to the user so first go will be alert, later I will do something snazzy.

I am just getting head around jQuery, so please excuse noobness of question. I will think that either one or the other of these alerts below would fire, but neither of them do and nothing also logs in the console.

$(document).ready(
   function() {
      $('#submitRating').click(
         function($e) {
            $e.preventDefault();
            //console.log("INSIDE");
            $.post(
                '/bla/bla/whatever',
                $('form :input').serialize(),
                function(xml) {
                   console.log(xml);
                   if ((a=parseInt($(xml).text())) > 0) {
                      alert('Rating Successfully Updated');
                   } else {
                      alert('Rating Not Successfully updated answer = ' + a);
                   }
                },
                'xml'
            );
         }
        );
   }
);