troubleshooting Question

AJAX: .readyState and .status

Avatar of UnexplainedWays
UnexplainedWays asked on
JavaScript
4 Comments1 Solution6436 ViewsLast Modified:
I've always used this code:

if (ajax.readyState == 4 || ajax.readyState == 'complete')
{
    if(ajax.status == 200)
    {
          //then use the responseText here
    }
}


However i've had to change my code to now use Response.Close() and not Response.End() (another Q, i can post link if your interested).  When i use .Close() tis status now fails.  Is this line really needed?

Thanks.
ASKER CERTIFIED SOLUTION
netsmithcentral

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros