title: VBScript (Classic ASP ) and multiple ajax calls side by side
body: <p>I have once ajax call which does connect to database, sets one flag in database and waits for one file to be created by some other process which looks up the flag.</p>
  
  <p>Till the file is created on server, ajax keeps waiting. Once file is created, ajax reads the file and displays the content.</p>
  
  <p>Now issue is that sometime the backend process which creates the file, stuck into socket issue, and never created the file, but ajax keeps waiting in that case, which gets timedout only when its timeout occurs, </p>
  
  <p>What all I want to show a stop request button, which could stop current ajax request as timeout is long, and user could want to stop it prior to timeout.</p>
  
  <p>Here is what I tried, I modified the code which keeps looking the existence of file, and added a session variable check , like if Session("AbortCheck") = true then exitout from the script.</p>
  
  <p>and placed another ajax call to update the sessin variable so that on loop when the script will find session  = true it will immediately stop the request.</p>
  
  <p>While debugging I found that my my new ajax request which updates the session variable actually executed only when the first ajax is completed. and therefore its never stopped on user request to stop the request.</p>
  
  <p>Could anyone let me know how to stop a running ajax (which is taking time) on user input ?</p>
  
  <p>Thanks</p>