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

  • Home
  • SEARCH
  • 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 8724357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:48:47+00:00 2026-06-13T07:48:47+00:00

I’m having an issue with a DropDownList multiselect ( Reference ). What I want…

  • 0

I’m having an issue with a DropDownList multiselect (Reference).

What I want…

I want to programmatically click some checkboxes from the dropdown using their values (for postback matters).

BRIEFING


In ‘Reference’, I found out that there’s a bug in jQuery, so I needed to do this ->

$("select").multiselect("widget").find(":checkbox").each(function(){
    this.click();
});

So, I tried this and worked… then, I added the “[value=’value’]”, and it worked. That’s exactly what I needed.

$("select").multiselect("widget").find(":checkbox[value='value']").each(function(){
    this.click();
});

Here’s what I did: I obtained an array with the values of the selected before postback (consultantValues). Then, I want to find the checkbox on the dropdown “Consultant” with a value from the array, and finally, click it.

Code->

for (var x = 0; x < consultantValues.length; x++) {
    var consultantSelected = ":checkbox[value='" + consultantValues[x] + "']";
    var doConsultantStringCode = $("id$='ddlConsultant']").multiselect("widget").find(consultantSelected);    
    for (var a = 0; a < doConsultantStringCode.length; a++) {
        doConsultantStringCode[a].click();
    }
}

This works like a charm :B
By the way, I use the “for” instead of the “each” because it runs faster.

PROBLEM


In other dropdown, I try to do the same… it worked, but suddenly it stopped working :/

Code ->

for (var i = 0; i < selectedManagements.length; i++) {
   var checkboxValue = ":checkbox[value='" + selectedManagements[i] + "']";
   var findCheckbox = $("[id$='ddlManagement']").multiselect("widget").find(checkboxValue);
   for (var k = 0; k < findCheckbox.length; k++) {
     findCheckbox[k].click();
   }
}

I’m stuck with this :/

NOTES:

  • What I was able to see, the findCheckbox has length = 0… don’t understand why now has 0 length when before had 1…
  • the dropdowns are ASP controls.
  • If you need any extra info, just let me know
  • 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-13T07:48:48+00:00Added an answer on June 13, 2026 at 7:48 am

    Instead of emulating clicks, why don’t you just add checked="checked" attribute? This is actually way too hack-ish to trigger DOM events that user did not initiate.

    Just do this:

    $("select").multiselect("widget").find(":checkbox").each(function(){
        this.attr({ checked: "checked" });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
We're building an app, our first using Rails 3, and we're having to build
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported

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.