title: How to pass client side javascript return value to ASP classic server side
body: <h1>javascript</h1>
  
  <pre><code>       function test(abc) {
           var ddlArray = new Array();
              var ddl = document.getElementById('AdjusterList');
            for (i = 0; i &lt; ddl.options.length; i++) {
              ddlArray[i] = ddl.options[i].value;
            }
    var indexsel = ddl.selectedIndex;
        return indexsel ;            
       }
  </code></pre>
  
  <hr>
  
  <h1>ASP</h1>
  
  <pre><code>                 strArrayCRN = osRecordSet.RecordCount
                   strArrayCRN2 = osRecordSet2.RecordCount
                   dim StrCount 
                   StrCount =strArrayCRN+strArrayCRN2
  </code></pre>
  
  <hr>
  
  <h1>HTML +ASP</h1>
  
  <pre><code>&lt;select name="AdjusterList" id="AdjusterList" onchange='test("&lt;%=StrCount%&gt;")'&gt;&lt;%
  %&gt;
     &lt;option value="0"&gt;Please choose an option from the list.&lt;/option&gt;
    &lt;% Do While (osRecordSet.EOF = False)
         %&gt;&lt;option value="&lt;%=osRecordSet.RowPosition%&gt;"&gt;
            &lt;%=osRecordSet.Fields("NAME")%&gt;&lt;/option&gt;
        &lt;%
       osRecordSet.MoveNext
        Loop        %&gt;&lt;%
      Do While (osRecordSet2.EOF = False)
              %&gt;&lt;option value="&lt;%=osRecordSet2.RowPosition%&gt;"&gt;
             &lt;%=osRecordSet2.Fields("NAME")%&gt;&lt;/option&gt;
         &lt;%   osRecordSet2.MoveNext    Loop        %&gt;
  </code></pre>
  
  <h2>        </h2>
  
  <p>Here i want to pass the return value of  function test() i.e value of the selected index to asp server side</p>