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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:59:35+00:00 2026-05-29T05:59:35+00:00

I’m using knockoutjs 2.0 I’ve been trying to have this table work in IE8

  • 0

I’m using knockoutjs 2.0
I’ve been trying to have this table work in IE8 (It works fine in FF, Chrome and IE9):

<table data-bind="foreach: Applications">
    <tr>
        <td><input type="text" data-bind="value: Name"/></td>
    </tr>
</table>

In IE8 I get the error:
Error: ‘undefined’ is null or not an object
URL: http://127.0.0.1:81/Scripts/jquery-1.5.1.min.js

I’ve actually fixed the issue by making the table a tbody with a template and making the template contain the table row. But this is not that clean and I am wondering if there is a better solution.

Below is how I setup the view model:

self.Applications = ko.observableArray([]);

$.each(model.Applications, function (i, applicationItem) {
    var application = new Application(applicationItem.ApplicationID, applicationItem.Name);
    self.Applications.push(application);
});

function Application(applicationID, name) {
    var self = this;
    self.ApplicationID = applicationID
    self.Name = ko.observable(name);
};

EDIT: Found a solution
Used containerless control flow instead

<table>
    <tbody>
    <!-- ko foreach: Applications -->
    <tr>
        <td><input type="text" data-bind="value: Name"/></td>
    </tr>
    <!-- /ko -->
    </tbody>
</table>
  • 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-29T05:59:35+00:00Added an answer on May 29, 2026 at 5:59 am

    your fix works fine, if you want a less verbose option you can simply put the data-bind on the “tbody” node:

    <table>
        <tbody data-bind="foreach: Applications">
            <tr>
                <td><input type="text" data-bind="value: Name"/></td>
            </tr>
        </tbody>
    </table>
    

    The problem is that ie8 automatically adds a “tbody” to the DOM (even if not present in the markup). so, if the data-bind attribute is on the “table” node, when knockout executes the foreach, the new children are added to “table” and not to “tbody”, obtaining something like:

    <table data-bind="foreach: Applications">
        <tr>
            <td><input type="text" value="John"/></td>
        </tr>
        <tbody>
        </tbody>
    </table>
    

    And IE is not happy about it. this is why, as you have surely found, using only the “containerless” notation is not enough, and you need the “tbody” node. Note that other browsers have no problem handling this.
    This is one of the “must know” tricks when using knockoutjs.

    Hope this helps undertanding what’s going on.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have some data like this: 1 2 3 4 5 9 2 6
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have thousands of HTML files to process using Groovy/Java and I need to
I am trying to loop through a bunch of documents I have to put
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.