Using jQuery with Windows 8 Metro JavaScript App causes security error

You need to edit the jQuery source so that you pass the jQuery.support function to MSApp.execUnsafeLocalFunction, which disables the unsafe content checking, like this: jQuery.support = MSApp.execUnsafeLocalFunction(function() { var support, all, a, select, opt, input, fragment, tds, events, eventName, i, isSupported, div = document.createElement( “div” ), documentElement = document.documentElement; // lots of statements removed for … Read more

how to reset

The jQuery solution that @dhaval-marthak posted in the comments obviously works, but if you look at the actual jQuery call it’s pretty easy to see what jQuery is doing, just setting the value attribute to an empty string. So in “pure” JavaScript it would be: document.getElementById(“uploadCaptureInputFile”).value = “”;