title: Call ASP Classic Function from Javascript
body: <p>I have a file on our local database page that needs to be able to delete a client after prompting the user to confirm deletion. </p>
  
  <p>The function <code>deleteClient</code> already exists and is very long and elaborate as there are several steps in removing the information from the database in the proper way. </p>
  
  <p>I have set up the page so that when the user clicks that delete button it calls the javascript function <code>confirmdelete()</code> then it should call the ASP function to do the deed.</p>
  
  <p>How do I call an ASP function from a javascript function?</p>
  
  <pre><code>&lt;SCRIPT TYPE="text/javascript"&gt;
       function confirmdelete(){
           if (window.confirm('Are you sure you want to delete client?'){
  
                    // How do I call deleteClient here?
  
           }else
                return false;
       }
  &lt;/SCRIPT&gt;
  &lt;%
    Function deleteClient
      ...
      ...
    End Function
  %&gt;
  &lt;FORM NAME=addclient METHOD=post ACTION="..."&gt;
      &lt;INPUT type=Submit name=btnSubmit value="Delete" onClick="confirmdelete()"&gt;
  &lt;/FORM&gt;
  </code></pre>