Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Re: HTTP 404 Not Found


Message #1 by "Joe Fawcett" <joefawcett@h...> on Thu, 01 Aug 2002 08:56:15 +0100
You acn on modern IE and Netscape machines. On IE you need to use the 
MSXML2.XmlHttp object to send a get request, examine the status code and if 
it is '404' do your own thing, if it is '200' then all is well and you can 
then display the page.
For examples of this download the MSXML4 core services package from 
Microsoft and look in the Help files for XmlHttp.
In Netscape it is very similar except that the object is called 
'XMLHttpRequest' and it is built in to the browser. There are examples at:
http://www.mozilla.org/xmlextras/

Joe

>From: tzhang@h...
>Reply-To: "javascript" <javascript@p...>
>To: "javascript" <javascript@p...>
>Subject: [javascript] HTTP 404 Not Found
>Date: Wed, 31 Jul 2002 23:08:03
>
>Hi:
>
>Are there any way to intercept "HTTP 404 Not Found" response using
>JavaScript at client side, then display some customized message instead of
>standard "page not found" message?  I can't customeize error message at
>server.
>
>Thanks!
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20




_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


  Return to Index