internet explorer - Binding error in Knockout.js in IE9 Compatibility View -


The UI of my web app is mostly built with excellent knockout.js. This is showing some layout errors in IE8 under IE7 compatibility mode. I've tried to add a meta tag to force the benchmark mode:

& lt; Meta http-equiv = "X-UA-Compatible" content = "IE = edge" />

However, in IE 9 under IE 9 compatibility view (which I believe to be) That some users will be set) This causes an error when knockout bindings it:

DOM exception: INVALID_CHARACTER_ERR (5)

I get lots of reference to this error on the net Got it - the way DOM elements have been created - but obviously I'm not controlling it, is a knockout.

To render all current and future versions of IE to render in standard mode, there is a strong and minimal way to make Hamy method, which makes Knockout.js DOM Is also compatible with? Apart from this, any knockout.What can be expanded on what JS is doing here, which does not like IE9? thanks a lot.

Update:

I have separated at least one problem in my markup. I have a pair of radio buttons:

  Lt; Input type = "radio" data-bound = "checked": gender, entry: {name: 'gender-' + ID ()} "value =" @ ((int) sex.mail) "/> & Lt; Period & gt; From males & lt; / Span & gt; & Lt; Input type = "radio" data-bind = "checked: gender, attribute: {name: 'gender-' + ID ()}" value = "@ ((int) sex.Female)" /> & Lt; Period & gt; Woman's & lt; / Span & gt;   

The name of the radio buttons of this pair is produced in the form of the "gender-", the id of the currently visible visual model, because I have a deeper with many examples of this pair The hierarchy is radio buttons. Because I'm generating a name attribute with knockout, I'm not specifying this against input in markup - and when I also add the manual name "joe", it ties correctly in browser mode: "IE9 compatibility View" . So it seems that in compatibility mode, the radio button is considered invalid by IE because its name is not attribute but it works under browser mode: "IE9"

In addition to this it is not specifically related to the IE-Edge meta tag, whenever I fail to switch to compatibility view - but my next question is, why not override the Meta tag browser setting Does it?

Try wrapping the name attribute with quotes.

  & lt; Input type = "radio" data-bind = "checked: gender, atri: {'name': 'gender-' + ID ()}" value = "@ ((int) sex.)" /> ;   

Check the answer details on the comments below

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -