Error : HTML1701: An attempt was made and denied to insert dynamic HTML in the document RRS feed

  • Question

  • Hi folk,

    I'm using slick grid jQuery plugin to set up the data grid in tabular form which will load more data on scroll. Initially, i tried ListView to do this but I ended it without using it becuase it doesn't seem suitable for this control.

    I integrated it and when i run it says me "HTML1701: An attempt was made and denied to insert dynamic HTML in the document"...I know this is because plugin in using innerHTML() method to create HTML elements which is actually banned as per metro guideline..

    What should be solution here ? What is the use of  toStaticHTML().


    Monday, May 28, 2012 1:04 PM


All replies

  • Do i need to replace every occurrence of innerHTML() using MSApp.execUnsafeLocalFunction() ?

    My jQUery plug in may call append(),appendTo(),html() of jQuery. so what is best way to do this ?

    Is there anything we can override jQuery method in a single piece of code ?


    Monday, May 28, 2012 2:07 PM
  • http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-476T

    I think this video from the BUILD 2011 conference is a good watch for you. Talks all about that stuff...

    Monday, May 28, 2012 2:40 PM
  • Webby,

    You do not need to replace every call to innerHTML().  Find out what code in the slickQuery plugin is causing the problem and what it is trying to do.  Only certain things will trigger this error.  And yes The Build talk is important to understand what this protects!


    Jeff Sanders (MSFT)

    Tuesday, May 29, 2012 7:30 PM