title: Setting a timeout for ServerXMLHTTP request
body: <p>Does anyone know how to set up set up a default action for when a ServerXMLHTTP request times out?  I'm using setTimeouts() to set the time out options according to the <a href="http://msdn.microsoft.com/en-us/library/ms760403%28v=VS.85%29.aspx" rel="noreferrer">MSDN site</a>.</p>
  
  <p>Ideally I would like to initialize the request again from the beginning or refresh the page should it time out.</p>
  
  <p>I'm using classic asp and jscript.</p>
  
  <p>Here's my request:</p>
  
  <pre><code>function serverXmlHttp(url) {
      var serverXmlHttp;
      serverXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP.6.0");
  
      // set time out options
      serverXmlHttp.setTimeouts(15000,15000,15000,15000);
  
      // does not work
      // serverXmlHttp.ontimeout(Response.Write("page has timed out"));
  
      serverXmlHttp.open("GET", url, false);
      serverXmlHttp.send();
  
      if (serverXmlHttp.readyState == 4) {
          return serverXmlHttp.responseText;
      }
  }
  </code></pre>