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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:00:50+00:00 2026-05-22T03:00:50+00:00

Check out this fiddler link With the working Code: KO Example Code The Idea

  • 0

Check out this fiddler link With the working Code: KO Example Code

The Idea is to populate them with data then be able to move them back and forth between the two lists.

  • 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-22T03:00:51+00:00Added an answer on May 22, 2026 at 3:00 am

    The populating of the selects works fine for me once I added a resource in jsFiddle to the knockout js file. I used http://knockoutjs.com/js/knockout-1.2.0.js

    Ok, I’ve edited my answer and removed most of it once I realised that I’d misunderstood @hyperslug’s reply, and then went and produced pretty much exactly the same code! @hyperslug’s answer, was slightly better than mine as I hadn’t realised that removeAll returns an array of removed items.

    In addition to @Hyperslug’s answer, you also have a problem with the enabled state of the buttons. On page load this is solved by

    new ko.observableArray(),
    

    instead of

    new ko.observableArray([""]),
    

    The latter creates an observable array of length 1 instead of 0.

    To get the button enabled status to change after all items have been unchecked, you do seem to need to clear down availHighlight or selectHighlight. removeAll() to the rescue again.
    this.availHighlight.removeAll()
    or
    this.selectHighlight.removeAll()

    In answer to why @hyperslug’s $.each() code didn’t work, this is because inside a jQuery each() anonymous function, ‘this’ refers to the item in the collection, not the viewModel instance.

        $.each(removed, function(i,r){
            //'this' is now the same as 'r', so the following line doesn't work as intended
            this.available.push(r);
        });
    

    Hope this helps

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

Sidebar

Related Questions

Please check out this example, first in FF, Chrome or Safari: [demo link removed]
First check out this code. I seems like it should work for me, but
Check out this site: http://photoshop.tutorialcraft.com/ Notice the sun go to the top and then
Guys check this out : http://www.codetoad.com/html/buttons/image_submit_button.asp You'll notice then when you click the button
Please check out this piece of code, more specifically the hourStep calculations. int h
So, check out this screenshot of a page I'm working on in Chrome Developer
Check out this test: [TestFixture] public class Quick_test { [Test] public void Test() {
Update: Check out this follow-up question: Gem Update on Windows - is it broken?
So this question will get technical – eventually – but first check out Hanselminutes
If I check out a tagged version of my source code without creating a

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.