- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
My apologies if this is a simple question. When I build a windows 8 app (in the "Cordova Hybrid Mobile App Platforms"), and load it using the instructions on "http://html5dev-software.intel.com/documentation/index.php?DOC=WINDOWS_STORE_BUILD_TEST_SUBMIT", it loads the splash screen and then immediately takes me back to the desktop.
The error I get is if I check Event Viewer is:
Unable to add dynamic content. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. For example, using the innerHTML property to add script or malformed HTML will generate this exception. Use the toStaticHTML method to filter dynamic content, or explicitly create elements and attributes with a method such as createElement. For more information, see http://go.microsoft.com/
I read through the link in the error, but I'm not doing any xhr requests. I do have several innerHTML calls, but I'd guess that would be fairly normal, isn't it? Is there anything I can do to work around this?
Thanks in advance! :-)
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you create a new app based off one of the demos, build that and install it to see if you get the same error? If that works fine, start moving your code to the new app until you find out what is causing the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks John!
I started a new Blank Cordova app, and just added an innerHTML change to it, and it crashed the same way. Here is the code:
<body> <h1 class="align-center" id="changeThis">A Blank Project Template</h1> <p class="align-center"> To use this template as a starter app, start with init-app.js and app.js for your JavaScript code. See the README.md file for more details and the comments inside index.html, app.js and init-app.js. </p> <br> <p class="align-center"> <input type="button" id="id_btnHello" value="Touch Me"> </p> <script src="cordova.js"></script> <!-- "Phantom" cordova.js required for projects that use plugins --> <script src="js/app.js"></script> <!-- for your event code, see README and file comments for details --> <script src="js/init-app.js"></script> <!-- for your init code, see README and file comments for details --> <script src="xdk/init-dev.js"></script> <!-- normalizes device and document ready events, see file for details --> <script type="text/javascript">document.getElementById('changeThis').innerHTML = 'All this does is change the text!";</script> </body>
So, am I the only person that is using innerHTML with XDK/Cordova and Windows 8.1? If not, are there any suggestions/workarounds? I'd hate to redo the whole thing, and some parts may simply not be feasible without a complete rewrite :-(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suspect this is the source of your problem: http://stackoverflow.com/a/29035134 it's a security restriction imposed by the platform, the XDK does not control this behavior, it is a function of the platform. Here's another useful article: http://www.infragistics.com/community/blogs/mihail_mateev/archive/2013/02/10/developing-windows-store-applications-with-phonegap-and-jquery-mobile.aspx

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page