winjs

How do I hide virtual keyboard for select element in Win8 JavaScript app?

大憨熊 提交于 2019-12-19 07:10:21
问题 I'm creating a Windows 8 application in JavaScript. I have these html elements in the markup: <input id="myField1" type="number"></input> <select id="myField2"> <option value="one">One</option> <option value="two">Two</option> <option value="three">Three</option> </select> When I tap myField1 on the device without physical keyboard, virtual keyboard appears. After that if I tap on the myField2 , the keyboard remains in place. But I don't want to have typeahead in this particular <select>

How do you get Angular.js to work in a Windows 8 store app?

女生的网名这么多〃 提交于 2019-12-18 14:48:35
问题 The app runs but Angular data objects are not recognized. Here is the JavaScript error I am getting: Exception was thrown at line 1059, column 11 in ms-appx://28934b41-4dd2-4414-b9a9- a73c11c1b743/js/angular.js 0x800a139e - JavaScript runtime error: No module: ngLocale Exception was thrown at line 4473, column 9 in ms-appx://28934b41-4dd2-4414-b9a9- a73c11c1b743/js/angular.js 0x800a139e - JavaScript runtime error: HierarchyRequestError The program '[5112] WWAHost.exe' has exited with code 1

Reading file in Windows Metro javascript app

自作多情 提交于 2019-12-18 09:26:40
问题 Is this the right way to read the content of a file picked by a filepicker? I need to read the image data in order to send it to a webservice in my Windows Metro Javascript App. I use a readFile function with a callback that returns an evt parameter and then use encodeURIComponent(evt.target.result): document.getElementById("btnUpload").onclick = function () { var input = document.getElementById("file_input"); readFile(input.files[0], function(file, evt) { WinJS.xhr({ type: "post", url: "http

WinJS.xhr local network error

醉酒当歌 提交于 2019-12-18 08:47:09
问题 I am trying to make a simple windows 8 app but I have a problem. When I try to make a xhr request to a local webserver it fails with the error code: 0x2efd Sample code: WinJS.xhr({ url: "http://192.168.0.30" }).then( function completed(response) { //var json = JSON.parse(response.responseText); //var list = new WinJS.Binding.List(json.results); console.log(response.responseText); }, function error(error) { console.log(error) }, function progress(progress) { } ); But when I try a remote IP for

URI schemes supported in Windows 8 apps

烂漫一生 提交于 2019-12-18 06:54:51
问题 What are the URI schemes supported in Windows 8 apps? I have seen references to ms-appx: and ms-appdata: and some rare mentions of ms-resource: but I could not find any document that would be a list of the schemes (although I thought I have seen one in the past). I am wondering if URL.createObjectURL returns some other schemes, but I can't see a version of it for XAML apps. http://msdn.microsoft.com/en-us/library/windows/apps/Hh781215.aspx. Are there any other URI schemes supported in WinRT?

Is dispatchEvent a sync or an async function

核能气质少年 提交于 2019-12-18 04:37:11
问题 I am trying to write an event handler for a custom event in WinJS. I am not too sure how this works in IE - I am creating a custom event and dispatching it - var eventObject = document.createEvent("CustomEvent"); eventObject.initCustomEvent("dropbomb", true, true, null); this._element.dispatchEvent(eventObject); My handler is - this._element.addEventListener("logtelemetry", function () { console.log("boom"); }); Can I be certain that the handler will be called in sync and not at a later time?

WinJS.xhr: Network Error 0x2efd, Could not complete the operation due to error 00002efd

此生再无相见时 提交于 2019-12-17 19:28:56
问题 I have problem with WinJS.xhr when developing a Windows 8 Metro application in JavaScript. WinJS.xhr({ url: "http://www.seznam.cz"}); When above code is executed, I see in log: SCRIPT7002: XMLHttpRequest: Network Error 0x2efd, Could not complete the operation due to error 00002efd. I have enabled "Internet (Client)" capability in manifest. Maybe the problem is because I am behind proxy and using VPN, but I can access internet using Google Chrome (I just need to authorize, otherwise HTTP

Using jQuery with Windows 8 Metro JavaScript App causes security error

风格不统一 提交于 2019-12-17 07:08:14
问题 Since it sounded like jQuery was an option for Metro JavaScript apps, I was starting to look forward to Windows 8 dev. I installed Visual Studio 2012 Express RC and started a new project (both empty and grid templates have the same problem). I made a local copy of jQuery 1.7.2 and added it as a script reference. <!-- SomeTestApp references --> <link href="/css/default.css" rel="stylesheet" /> <script src="/js/jquery-1.7.2.js"></script> <script src="/js/default.js"></script> Unfortunately, as

Posting JSON object through WinJS.XHR

亡梦爱人 提交于 2019-12-14 02:43:37
问题 I'm having abit of problems posting data from WinJS.xhr to a PHP script. "obj" is a stringified JSON object WinJS.xhr({ type: "POST", url: dataUrl, headers: { "Content-type": "application/x-www-form-urlencoded" }, data: obj, }) However the $_POST variable is always empty. I've tried changing content-types, and escaping the object but no luck :( 回答1: Your content-type when posting json should typically be application/json Secondly make sure you 'stringify' your json object. Based on: Post JSON

How to programmatically close a MessageDialog in Win8 app using WinJS?

久未见 提交于 2019-12-14 01:24:00
问题 Here is a similar question to mine regarding how to programmatically close a MessageDialog in a Win8 app, but the author of the question is using C#. I'm curious about how to solve the issue with WinJS. Is there any way to cancel a MessageDialog programmatically with WinJS without have access to the CommanUI objects within the dialog itself? I cannot simply invoke the handler associated with an appended CommandUI button since, in some cases, I wouldn't know which button index has that