Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9178667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:36:24+00:00 2026-06-17T17:36:24+00:00

I need to filter my list based on selected dropdown value. I’ve created a

  • 0

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 post 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:

<xsl:otherwise>
  <select name="ID" size="1" onchange="document.location.href='pageName.aspx?year=' + this.options[selectedIndex.value])">
    <option selected="true" value="0">Choose One...</option>
    <xsl:call-template name="dvt_1.body">
      <xsl:with-param name="Rows" select="$Rows" />
    </xsl:call-template>
  </select>

I’ve no idea of xslt and this isn’t firing any event when i change the dropdown value. Please help me with this.

Update: The HTML I get:

<td valign="top">
  <div WebPartID="9e0da2fd-21ea-417f-863d-6551d16e72a1" HasPers="false" id="WebPartWPQ3" width="100%" class="noindex" allowDelete="false" style="" >
    <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">
      <option selected="" value="0">Choose One...</option>
      <option>2009</option>
      <option>2010</option>
      <option>2011</option>
      <option>2012</option>
      <option>2013</option>
    </select>
  </div>
</td>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:36:25+00:00Added an answer on June 17, 2026 at 5:36 pm

    I’m somewhat doubtful that this is an XSLT issue. The script for the onchange handler in that tutorial seems to boil down to:

    document.location.href='pageName.aspx?year=' + this.options[selectedIndex].value
    

    Note that .value is outside the []. Could you give that a try? Is your browser reporting any JavaScript errors when you change the dropdown selection?

    Now, according to this tutorial, you can filter a list by specifying query parameters named FilterField1, FilterValue1, etc, so could you try something like this:

    document.location.href='pageName.aspx?FilterField1=ColumnName&amp;FilterValue1=' 
     + this.options[selectedIndex].value + '&amp;year=' + this.options[selectedIndex].value
    

    Here you would replace “ColumnName” with the actual name of the column, as indicated in that tutorial. Could you try something like that?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list box that is populated based on a previous filter (a
I have some text i need to filter out a list of bad words
I have list of catalog paths and need to filter out some of them.
I need to return a list of counties, but I need to filter out
I have a list filter = ['a', 'b', 'c']. I need to frame the
I need to filter out strings that contain anything other than letters, numbers, dots,
I need to be able to clone a drop down list and filter only
I am attempting to filter a list based on a predicate Func. I use
I've developed a custom i18n system in Jinja2 based on the following filter (simplified):
Possible Duplicate: jQuery disable SELECT options based on Radio selected (Need support for all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.