KnockoutJS won’t bind to fields with numbers at the end?


Maybe this is just me? Almost finished my Sales Entry form I’ve been tinkering with- adding a “Create Customer” dialogue, and every field bound as it should (using Knockout) except for 3; Address1, Address2 and Address3. The moment I changed Address1 to AddressHouseNumber, it started working- so i changed the other, and sure enough they all started working. I tripple checked for typo’s so it wasn’t that- the input fields looked like this;

<input data-bind="value: Address1, uniqueName: true" class=""/>
<input data-bind="value: Address2, uniqueName: true" class=""/>
<input data-bind="value: Address3, uniqueName: true" class=""/>

Weird! has any one else come across something like this?

  1. #1 by RP Niemeyer on January 31, 2011 - 14:07

    Was curious about this one, but couldn’t reproduce it. Is there anything significantly different going on in your app, then in this sample?

    http://jsfiddle.net/rniemeyer/xGFsm/

  2. #2 by shawson on February 4, 2011 - 10:05

    hmmm weird! No not really- I shall try to put up a demo over the weekend..

(will not be published)