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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:06:19+00:00 2026-06-16T16:06:19+00:00

I have a block of code which is supposed to loop over an observable

  • 0

I have a block of code which is supposed to loop over an observable array, and generate a series of grouped checkboxes (as in this example ).

Here’s what I’m getting instead. http://dl.dropbox.com/u/495070/shared/2012-03-28_09.03.33.000.png

here’s a jsFiddle that demonstrates the issue.

And here’s the (not as useful as the fiddle) code snippet that generates it.

            <fieldset id="myList" data-role="controlgroup"  data-bind='foreach : acRoleOps()'>
                <legend>
                </legend>
                <br><br><br><h4><span data-bind="text: $root.opNameGet(OperationID)"></span></h4>

                <input data-theme="c" type="checkbox" data-role="controlgroup" data-bind="attr: { 'data-id': 'checkbox-bcreate-' + ID, name: 'checkbox-bcreate-' + ID, id: 'checkbox-bcreate-' + ID }, checked: BCreate, click: $parent.opPrivsToggle" />
                <label data-theme="c" data-bind="attr: { for: 'checkbox-bcreate-' + ID }">Create</label>

                <input data-theme="c" type="checkbox" data-role="controlgroup" data-bind="attr: { 'data-id': 'checkbox-bread-' + ID, name: 'checkbox-bread-' + ID, id: 'checkbox-bread-' + ID }, checked: BRead, click: $parent.opPrivsToggle" />
                <label data-theme="c" data-bind="attr: { for: 'checkbox-bread-' + ID }">Read</label>

                <input data-theme="c" type="checkbox" data-role="controlgroup" data-bind="attr: { 'data-id': 'checkbox-bedit-' + ID, name: 'checkbox-bedit-' + ID, id: 'checkbox-bedit-' + ID }, checked: BEdit, click: $parent.opPrivsToggle" />
                <label data-theme="c" data-bind="attr: { for: 'checkbox-bedit-' + ID }">Edit</label>

                <input data-theme="c" type="checkbox" data-role="controlgroup" data-bind="attr: { 'data-id': 'checkbox-bdelete-' + ID, name: 'checkbox-bdelete-' + ID, id: 'checkbox-bdelete-' + ID }, checked: BDelete, click: $parent.opPrivsToggle" />
                <label data-theme="c" data-bind="attr: { for: 'checkbox-bdelete-' + ID }">Delete</label>

            </fieldset>

Has anyone seen this before? If so, can you point out where I went wrong?

Thanks!

  • 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-16T16:06:20+00:00Added an answer on June 16, 2026 at 4:06 pm

    You need to use the knockout <!-- ko foreach: myItems -->
    http://knockoutjs.com/documentation/foreach-binding.html

    http://jsfiddle.net/vNcNC/38/

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

Sidebar

Related Questions

In my code, I have this loop, which brings up various 2-hour time blocks.
I have this block of code inside a loop: var points = [new google.maps.LatLng(lat1,
I have the following block of code which works fine; var boughtItemsToday = (from
I have a txt file which contains a google adsense code block and I'm
I have a block of code in C like this- enum colors { //---->I
I have a block of code in my view like this: <% @map[value].each do
I have this block of code where when I hover (click for purposes of
I have code which is supposed to display an ad for 10 seconds, then
I have the following C# code which is supposed to serialize arbitrary objects to
I have some code that looks like this: document.getElementById(error).style.display = 'block'; and when this

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.