title: Triggering postback to send query parameters from DVWP dropdown box
body: <p>I need to filter my list based on selected dropdown value. I've created a DVWP for that and converted it into a dropdown. Now I'm following this <a href="http://sympmarc.com/2008/01/03/firing-an-event-when-a-user-selects-a-value-from-a-data-view-web-part-dropdown/" rel="nofollow">post</a> to fire events when dropdown value is selected but I just do not know where to change the code. I'm filtering the list based on years. I have an year list which stores year values and filters it accordingly when the dropdown is selected. I've modified it like this: </p>
  
  <pre><code>&lt;xsl:otherwise&gt;
    &lt;select name="ID" size="1" onchange="document.location.href='pageName.aspx?year=' + this.options[selectedIndex.value])"&gt;
      &lt;option selected="true" value="0"&gt;Choose One...&lt;/option&gt;
      &lt;xsl:call-template name="dvt_1.body"&gt;
        &lt;xsl:with-param name="Rows" select="$Rows" /&gt;
      &lt;/xsl:call-template&gt;
    &lt;/select&gt;
  </code></pre>
  
  <p>I've no idea of xslt and this isn't firing any event when i change the dropdown value. Please help me with this.</p>
  
  <p>Update: The HTML I get:</p>
  
  <pre><code>&lt;td valign="top"&gt;
    &lt;div WebPartID="9e0da2fd-21ea-417f-863d-6551d16e72a1" HasPers="false" id="WebPartWPQ3" width="100%" class="noindex" allowDelete="false" style="" &gt;
      &lt;select name="ID" size="1" onchange="document.location.href='http://pageName.aspx?year=' + this.options[selectedIndex].value" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal"&gt;
        &lt;option selected="" value="0"&gt;Choose One...&lt;/option&gt;
        &lt;option&gt;2009&lt;/option&gt;
        &lt;option&gt;2010&lt;/option&gt;
        &lt;option&gt;2011&lt;/option&gt;
        &lt;option&gt;2012&lt;/option&gt;
        &lt;option&gt;2013&lt;/option&gt;
      &lt;/select&gt;
    &lt;/div&gt;
  &lt;/td&gt;
  </code></pre>