AJAX功能不起作用

My questions are:

  1. How can I know if the AJAX is working properly?.
  2. How can I retrieve the sent data in the controller in CakePHP?

My code is:

function checkLength(obj,url){
    alert("URL="+url+"   OBJ="+obj); 

    if(obj)
    {
        var params = 'query='+obj; 
        var myAjax = new Ajax.Request(url,{method: 'post',parameters:params,onSuccess: loadResponse}); 
    }
}

I tend to use Firebug to debug my ajax, as the Net tab works fantastically for seeing outgoing requests along with what is returned from your script.

Check it out, http://getfirebug.com/

@Rajesh If you want to receive the data send from this function to the back end you can view the content using the $_POST[] array object in u r cakephp or the data[field] attribute of the controller