Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Ajax Programming

Exception with xmlHttp.status in mozilla/firefox


Hi all,

 I wanted to know whether my page is connecting to server or not using
xmlHttp request.
For that , I am using one condition in onreadystatechange function as..
function xxx()
{
if(xmlhttp.readyState==4)
{

   if(xmlhttp.status!=200)
   {
        error_handler();
   }

  ----------
 ---------------------

}
}

This is working fine in IE when there is no connectivity with server( I
stoped the server)..

But it's giving exception in mozilla/firefox when I stopped the server
(only when I stop .),

at line 65 in my code, as

[Exception... "Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult:
"0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
http://localhost/teamkollab/chat2/chat-ajax.js :: responseDisplayChat
:: line 65" data: no]

line 65 is
-------------- if(xmlhttp.status != 200)

I could not access the xmlhttp.status variable .

Does it mean that xmlhttp object won't be returned with status code
when it can not connect to a page ??
If yes, what will it return to know the status ??

How could I solve this  to not to get such exception ?

Please help me out ,
 Thanks in advance

Check out...

http://radio.javaranch.com/pascarello/2006/02/07/1139345471027.html

Eric

On 12/5/06, Prasad <prasad@gmail.com> wrote:

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc