O'Reilly logo

KnockoutJS Web Development by John Farrar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The uniqueName binding

IE6 does not allow radio buttons to be checked if they don't have a name attribute. Most of the time this is irrelevant because your radio button elements will have the name attributes to put them into mutually-exclusive groups. However, if you didn't add a name attribute because it's unnecessary in your case, Knockout will internally use uniqueName on those elements to ensure they can be checked. Hopefully, none of us will have to use IE6 but just in case, add the uniqueName handler to the data-bind attribute, something like this if needed:

<input data-bind="value: newName, uniqueName: true" />

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required