title: Classic ASP update on button click working only in IE not in other browsers
body: <p>I am working on Classic ASP application ,I have html table populated from sql database,  the html table has checkboxes in one of the cells,  on check box click I am opening a popup window where I am doing some update and after submitting, window gets closed automatically and previous page gets refreshed with the updated value ( here checkbox gets replaced with the updated value).
  Working fine with IE but not updating with other browers. </p>
  
  <p>For testing pop up window , I commented javascript window close and found that for IE data updates in the database but in other browsers it does nothing. May be issue with ADODB settings.The data I am updating is the current date and once it gets stored in the database , the previous page gets current date instead of checkbox.</p>
  
  <p>Please help , I am new to classic asp.
  <strong>Update:</strong> I printed the query , on IE it is printing correctly but in Chrome it is printing second parameter with some blank space on right. Example:in IE 'SHP' but in Chrome 'SHP '</p>
  
  <pre><code> &lt;!-- language: lang-js --&gt;
  
          function CloseWindow() 
          {
                  var trackerreport = document.getElementById("trackerreport").innerText;
                  var reporttype = document.getElementById("reporttype").innerText;
                  var report = reporttype.trim();
                  document.getElementById("Hidden1").value = trackerreport;
                  document.getElementById("Hidden2").value = reporttype;      
  
               switch (report) 
               {
              case "SHP": 
                   document.frmDtls.hfrom.value = 'DelSHP' ;
                   break;
              case "WHS":
                  document.frmDtls.hfrom.value = 'DelWHS' ;
                  break;
              default:
                  alert("None");
                  break;
              }     
                 document.frmDtls.method = "post" ;
                 document.frmDtls.action = "PRDB_UPDATE_BATCH_ORDER_PROCESSING_TRACKER_REPORT_SEGMENT_TIMESTAMP.asp" ;
                 document.frmDtls.submit();
                 window.close();
                 window.opener.location.reload();
          }
  
  
  
      &lt;!-- language: lang-vb --&gt;
          &lt;div align="center"&gt;
          &lt;p align="center"&gt;
          &lt;input type="button" style="background:yellow;color:black;height:25px; width:100px" value="Confirm" onclick="javascript: return CloseWindow();"&gt; 
          &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
          &lt;!--&lt;input type="submit" style="background:yellow;color:black;height:25px; width:100px" value="Confirm" &gt;  --&gt;
          &lt;input type="button" style="background:yellow;color:black;height:25px; width:100px" value="Cancel" onclick="javascript: return CancelWindow();"&gt;
          &lt;/p&gt;
          &lt;/div&gt;
  
  
  
          &lt;%
  
              Set objCommand = Server.CreateObject ("ADODB.Command")  
              Set objRec = Server.CreateObject ("ADODB.Recordset")
              objCommand.ActiveConnection = strConnect
  
              Dim sConn
              Dim tracker
              Dim reporttype
              Dim trackernew
  
           If Request("hfrom") = "DelSHP" Then
  
                  Set sConn = Server.CreateObject ("ADODB.Connection")
                  sConn.Open strConnect
  
                  tracker = Trim(Request("Hidden1"))
                  trackernew = CInt(tracker)
                  reporttype = Trim(Request("Hidden2"))
                  username = Trim(Request("Hidden3"))
                  objCommand.CommandText = "EXEC usp_UPDATE_BATCH_ORDER_PROCESSING_TRACKER_REPORT_SEGMENT '"&amp;trackernew&amp;"','"&amp;reporttype&amp;"','"&amp;username&amp;"'; "
                  Set objRecord = objCommand.Execute
                  sConn.Close
                  Set objRecord = Nothing
                  Set sConn = Nothing
  
          End If
  
          If Request("hfrom") = "DelWHS" Then
  
                  Set sConn = Server.CreateObject ("ADODB.Connection")
                  sConn.Open strConnect
  
                  tracker = Trim(Request("Hidden1"))
                  trackernew = CInt(tracker)
                  reporttype = Trim(Request("Hidden2"))
                  username = Trim(Request("Hidden3"))
                  objCommand.CommandText = "EXEC usp_UPDATE_BATCH_ORDER_PROCESSING_TRACKER_REPORT_SEGMENT '"&amp;trackernew&amp;"','"&amp;reporttype&amp;"','"&amp;username&amp;"'; "
                  Set objRecord = objCommand.Execute
                  sConn.Close
                  Set objRecord = Nothing
                  Set sConn = Nothing
  
          End If
          %&gt;
  
      &lt;!-- language: lang-html --&gt;
  
          &lt;div align="center"&gt;&lt;center&gt;
          &lt;form id="frmDtls" name="frmDtls"&gt;
          &lt;input type="hidden" name="hfrom" value = ""&gt;
          &lt;input id="Hidden1" name="Hidden1" type="hidden" runat="server" /&gt;
          &lt;input id="Hidden2" name="Hidden2" type="hidden" runat="server" /&gt;
          &lt;input id="Hidden3" name="Hidden3" type="hidden" runat="server" value="&lt;%= l_username%&gt;" /&gt;
  
          &lt;table border="2" width="50%"&gt;
           &lt;tr&gt;
              &lt;td width="40%" align="center" bgcolor="#C0C0C0"&gt;&lt;strong&gt;&lt;font size="2"&gt;Tracker Report ID &lt;/font&gt;&lt;small&gt;:&lt;/small&gt;&lt;/strong&gt;&lt;/td&gt;
              &lt;td id="trackerreport" width="60%" align="center" bgcolor="#C0C0C0"&gt;&lt;strong&gt;&lt;%=L_trackerreportid %&gt;&lt;/strong&gt;&amp;nbsp;&lt;/td&gt;
           &lt;/tr&gt;
           &lt;tr&gt;
              &lt;td width="40%" align="center" bgcolor="#C0C0C0"&gt;&lt;strong&gt;&lt;font size="2"&gt;Segment Status Event &lt;/font&gt;&lt;small&gt;:&lt;/small&gt;&lt;/strong&gt;&lt;/td&gt;
              &lt;td id="reporttype" width="60%" align="center" bgcolor="#C0C0C0"&gt;&lt;strong&gt;&lt;%=L_reporttype %&gt;&lt;/strong&gt;&amp;nbsp;&lt;/td&gt;
           &lt;/tr&gt;
  
          &lt;/table&gt;
          &lt;/center&gt;&lt;/div&gt;
  </code></pre>