title: Onclick syntax problem when passing two variables, classic asp
body: <p>My onclick function works beautifully when i pass one variable and doesn't respond once i try to pass two variables. is something wrong with my syntax?</p>
  
  <p>everything supporting this code has been tested and works fine so i'm certain something is wrong with the syntax the onclick line of code. any help would be awesome. </p>
  
  <pre><code>------------onclick code---------------------------------------------------
      Response.Write "&lt;td class=""alt""&gt;&lt;input type=""button"" onclick=""deleteRecordAtt(" &amp; AttID &amp;","&amp; StoredPath &amp; " )"" value=""remove"" /&gt;&lt;/td&gt;&lt;/tr&gt;"
  
  -----------function reference code in main page---------------------------------------
  
  function deleteRecordAtt(AttID, StoredPath){
  if(confirm("This will delect the attachment path"))
  {
  document.location.href="delete_attachments.asp?EMAIL_LETTERS_HOLD_ID="+AttID+"&amp;RedirURL="+escape(document.location.href);
  }
  }
  -----------function code in source page ----------------------------------------------
  
  &lt;%
  
  
  Dim AttID, RedirectURL, StoredPath
  Dim objConn
  
  AttID=request("EMAIL_LETTERS_HOLD_ID")
  RedirectURL=request("RedirURL")
  
  
  Set objConn = CreateObject("ADODB.Connection")
  objConn.Open "DSN=MyDSN"
  objConn.Execute("UPDATE EMAIL_SEND_ATTACHMENTS set ATTACHMENTS = Replace(LTRIM(RTRIM(ATTACHMENTS)), '"&amp; StoredPath &amp; "' ,'') WHERE EMAIL_LETTERS_HOLD_ID= "&amp; AttID &amp; " ")
  objConn.Close
  Set objConn = Nothing
  
  response.redirect RedirectURL
  %&gt;
  </code></pre>