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 6766949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:53:33+00:00 2026-05-26T14:53:33+00:00

I have several select lists on a page. They are all named in array-fashion

  • 0

I have several select lists on a page. They are all named in array-fashion so that they postback to the Controller in a list for a viewmodel. When they are rendered, they look as such:

<select id="OrderItemViewModels_2__OrderItemStatusId" name="OrderItemViewModels[2].OrderItemStatusId"><option value="-1"></option>
<option value="1">CONFIRMED</option>
<option value="2">NO SALE</option>
<option value="3">PENDING</option>
</select>

I am trying to bind .change() event handlers to them so I can trigger an .ajax call to fill another dropdown based on the value of this one, but the binding is not working. The JS looks like this:

 $(document).ready(function () {
      $('select[name$="OrderItemStatusId"]').each(function (){
        //alert(this.name);
        var dropdown = this;
        dropdown.change(function() {
          alert('testing ');
          //GetOrderItemReasons(dropdown.val());
        });
      });

The error I receive is “Object doesn’t support this property or method”. But, the first alert shows clearly that the item is being selected, because it shows the name correctly.

What am I doing wrong here?

  • 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-05-26T14:53:34+00:00Added an answer on May 26, 2026 at 2:53 pm

    Change:

    var dropdown = this;
    

    To:

    var dropdown = $(this);
    

    change() is a method of a jQuery object, so you’ll need to wrap this in a call to jQuery() or $().

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

Sidebar

Related Questions

I have several select tags on a page and I am grouping them using
I have a query that makes several calls within a SELECT statement to a
I have a selection list that is generated dynamically, it lists a number of
I have several 'select' elements on the page. When I choose some of options,
I currently have two types of Lists: List (named LintMessages) and List (named FilterList).
I have a page with a ScriptManager, a generic HTML drop-down list ( <select>
I have a page which lists several messages, and each of these messages has
I have a select list with several options. I wanna choose one then it
I am running a custom loop in a wordpress page that should list all
I currently have a working table that is sorted by several select boxes. I

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.