second parameter contains the word error, that's all!!! the real error is inside the text inside xhr parameter. error gets an xhr result and the status and maybe an exception object.
try alerting xhr.responseText. PS it's not xhtml but the xrh. from the source: (Function) error - A function to be called if the request fails. The * function gets passed tree arguments: The XMLHttpRequest object, a * string describing the type of error that occurred and an optional * exception object, if one occured. On 4/20/07, SiCo <[EMAIL PROTECTED]> wrote:
Hi, I am playing with ajax, the script works occasionaly but then errors and activates the error callback function (as I would expect) but how do I see what the actual error is. The manual says a second var is passed to it but how do I read it?! error: function(xhtml,error){ alert(error + "/n/nThere was a server error and your request could not be completed."); setError(); } Should that do it? - If so all I'm being returned is 'error'. Also can someone explain the statuses and how to use them. Generally it all works perfectly but sometimes I get these unknown errors and I really want to get to the bottom of them. Thanks Simon
-- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ