I'm using the jquery library to load the content of an html file. Something like this:
$("#Main").load("login.html")
If the file (in this case 'login.html') does not exist, I would like to detect it so that I can redirect the user to an error page for example. Any ideas how I can detect if the file to load exists or not?