Since the plugin uses $.ajax(ajaxSettings) internally to retrieve the file contents, you can pass any options you want into the ajaxSettings option and they'll be used. So you should be able to do something like this:

$('someelement').cluetip({
  ajaxSettings: {
    xhr: function() { }
  }
});

See http://docs.jquery.com/Ajax/jQuery.ajax#options for a list of $.ajax options. Also, make sure you use jQuery 1.3 or above and the latest clueTip version on Github ( http://github.com/kswedberg/jquery-cluetip/tree/master )


--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Apr 16, 2009, at 2:52 PM, zendog74 wrote:


I am successfully using clueTip to make ajax requests that return
either xml or json and populate the tooltips. It is working great.
However, I am trying to make my code more sophisticated to handle
exceptions and I need access to the xhr to do that properly. I have
been unable to find a way to get access to the xhr using clueTip,
especially in the ajaxProcess function. Is there a way to do this?

Here is what I am trying to do:

ajaxProcess: function(xhr, data) {
               return checkResponse(xhr.status, data);
           }

//Pseudo-code
function checkHttpStatusCode(statusCode, data){
 //Check the status code and send back the error message in the
returned xml packet if there is one.

}

Reply via email to