XMLHttpRequest onerror handler

T

Tim Streater

I want to add an onerror handler to my XMLHttpRequest object. It seems
that I can do this:

var req = new XMLHttpRequest();  
req.open ("POST", url, true);  
req.onerror = onError;

with:

function onError (evt)
{
// Look at evt.
}

but I am having some difficulty in finding what attributes I can expect
evt to have, that it might be interesting to examine. I'm using Safari
5.1 under Lion.

Thanks,
 
R

Rajesh Segu

Best way to check out the attributes of onError event object is to use
JS debugging tools.

Safari - Webkit Nightly build has inbuilt developer tools
Chrome - Developer tools inbuilt.
Firefox - Firebug
IE - Developer tools inbuilt

- Rajesh Segu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,250
Latest member
Charlesreero

Latest Threads

Top