title: how to send multiple selected values of two drop down list to ajax server?
body: <p>i want to know how to send multiple values to ajax from jquery.
  for example i have two drop down lists namely session ( contains monsoon, winter )
  year ( contains 2010 , 2011 , 2012, 2013 , etc ). i want to send both selected values these drop down lists to ajax at time from a jquery . so please give some idea.</p>
  
  <p>i tried to send single value as fallows.</p>
  
  <pre><code>      &lt;body&gt;
    &lt;form name="frm2" method="POST"&gt;
        &lt;table align="center" border="1"&gt;
  
           &lt;tr&gt;
              &lt;td class="style30"&gt;
  
              &lt;select  id="stream" name="current_session" &gt;
                  &lt;option value="Winter" &gt; Winter &lt;/option&gt;
                  &lt;option value="Monsoon"&gt;Monsoon&lt;/option&gt;
              &lt;/select&gt;&lt;/td&gt;
              &lt;td&gt;
                  &lt;select name="year2" id="year1" style="width:200px;" &gt;
                      &lt;option value="2015" &gt; 2015 &lt;/option&gt;
                  &lt;option value="2014"&gt;2014&lt;/option&gt;
                      &lt;option value="2013" &gt; 2013 &lt;/option&gt;
                  &lt;option value="2012"&gt;2012&lt;/option&gt;
                      &lt;option value="2011" &gt; 2011 &lt;/option&gt;
                  &lt;option value="2010"&gt;2010&lt;/option&gt;
                      &lt;/select&gt;
              &lt;/td&gt;              
     &lt;/tr&gt;      
     &lt;/table&gt;                
     &lt;/form&gt;
  
  
  
  
  
        &lt;script&gt;
       $( "#year1" ).change(function() {
       var selectedVal=$("#year1 option:selected").val();
       $.ajax({
               url:"checkonserver.jsp?given_year="+selectedVal,
         // here i sent only one selected value, 
          //but i want selected values both **sesion, year to be sent to ajax at time**.
  
  
        }
        });
        });
  </code></pre>
  
  <p>my ajax is as fallow (checkonserver.jsp)</p>
  
  <pre><code> &lt;head&gt;
  
  
      &lt;title&gt;JSP Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;%=request.getParameter("given_year")%&gt;
  
  
  &lt;/body&gt;
  </code></pre>