Derik Whittaker

Syndication

News


Knockout JS Error: Uncaught Error: NoModificationAllowedError

While trying to setup some bindings in Knockout I received the following error:

Uncaught Error: NoModificationAllowedError: DOM Exception 7

At first glance this was very odd to me as I have never seen this before.  Because I had made a few binding changes prior to my last refresh, I was not sure what was causing the error. In order to find out which was the culprit started removing one binding at a time until I found which binding was causing the issue.  Below is the binding which was bad, can you detect the issue?

image

If you don’t see the issue don’t worry, it took me a minute as well.  Below is the same code w/ the issue highlighted

image

In my carelessness I had used the text binder rather than the value binder.  This is NOT going to work when trying to binding to an input box, which makes perfect sense.  To resolve the issue I simply replaced my binder as below and everything worked correctly.

image

I understand why this fails but the error it produces is not very clear.  But remember anytime you get a binding error in Knockout make sure you are using the correct binder.

Till next time,

P.S. If you want to learn more about Knockout watch my Pluralsight Course on Knockout JS

P.S.S. If you want to learn how to transition your XAML skills to HTML you can watch my course on Html for the XAML Developer


Posted 07-19-2013 5:41 AM by Derik Whittaker
Filed under:

[Advertisement]

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)