winjs

Cookies in Windows 8 WinJS

左心房为你撑大大i 提交于 2019-12-08 09:31:31
问题 How can i enable for the IE10 store the cookies? Some internet services (Facebook Dialogs for example) pass variables this way which you need to use them in further request, but IE10 dont allow cookies. What i'm trying to do is login at facebook with "Windows.Security.Authentication.Web.WebAuthenticationBroker", get the token, and then open the feed dialog... when i try to open the feed dialog, i receive an error, because the page have no cookies... 回答1: If your question is about WinRT

Can't get feed in Windows 8 app

梦想与她 提交于 2019-12-08 07:42:28
问题 I am creating blog reader app for Windows 8 by using RSS feeds. Part of code: function downloadBlogFeed() { WinJS.xhr({ url: "http://feeds.feedburner.com/CssTricks" }).then(function (rss) { var items = rss.responseXML.querySelectorAll("item"); for (var n = 0; n < items.length; n++) { var article = {}; article.title = items[n].querySelector("title").textContent; var thumbs = items[n].querySelectorAll("thumbnail"); if (thumbs.length > 1) { article.thumbnail = thumbs[1].attributes.getNamedItem(

Twitter OAuth with WinJS

随声附和 提交于 2019-12-08 04:31:20
问题 Trying to authenticate with Twitter since over a week trough my Windows 8 app, but no success. My app is registered at Twitter and it should be able to read, write and sign in. I think I've tried all the descriptions at Twitter documentation, but nothing works. Guess the problem is at me, but can't find it. I get always the 403 forbidden response. My code: function getTwitterCredentials() { WinJS.xhr({ type:"get", url: "https://api.twitter.com/oauth/authenticate", headers: { consumerKey:

Controlling an iframe YouTube player within a Windows 8 Metro js app

人盡茶涼 提交于 2019-12-07 17:15:50
问题 While experimenting a little with the capabilities of Windows 8 Metro js apps (the ones created using HTML/Javascript/CSS, meant to be published on the Windows Store of the upcoming Windows 8), I went and created a very simple test application that creates dynamically an iframe-based YouTube player, tied to a specific video. So far, so good. Later, I wanted to be able to get feedback from the video being played at that iframe. Google offers extensive help on achieving this, and explains that

Sending multiple parameters to WinJS.Binding.converter() function

落花浮王杯 提交于 2019-12-07 13:40:29
问题 Is there a way to send more than one parameter to a WinJS.Binding.converter() function? Consider the following data and output: { contactName: "Tara Miller", mainNumber: "555-405-6190", alternateNumber: "555-209-1927" }, { contactName: "Bryan Bond", alternateNumber: "555-574-4270" }, { contactName: "Jenna Siever", mainNumber: "555-843-8823", alternateNumber: "555-799-5424" }, Here is the HTML. The MyData.chooseBestNumber converter function is used to display either a person's main phone

Where is ms-appdata?

我们两清 提交于 2019-12-07 12:04:48
问题 I am building a modern ui app and want to, with a batch file, write and periodically update data accessible though the ms-appdata:// protocol in my winjs app. I have the batch file to copy folders, but I cannot find the file path of the appdata. What is the default filepath for App1 's appdata and how can I force my app to create the folder? 回答1: ms-appdata:///[local | roaming | temp]/ maps to the StorageFolder returned from Windows.Storage.ApplicationData.Current.localFolder, roamingFolder,

How to Form POST to Paypal from WinJS iframe Windows 8 App?

醉酒当歌 提交于 2019-12-07 04:08:20
问题 I have a Windows 8 App using Javascript/HTML and within an iframe I have a Paypal form: <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="on0" value="Pages"> <select name="os0"> <option value="10">$1.95</option> <option value="25">$2.95</option> </select> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="encrypted" value="[removed]"> <input type=

Data Bind failing for Custom HtmlControl inside ItemTemplate of ListView

老子叫甜甜 提交于 2019-12-06 22:26:32
I have an ItemTemplate which is set on a ListView: <div class="commentTileTemplate" data-win-control="WinJS.Binding.Template"> <div class="commentTileControl" data-win-control="WinJS.UI.HtmlControl" data-win-options="{uri: '/htmlControls/commentTile/commentTile.html'}"></div> </div> The data bindings which are inside the HtmlControl, fails to bind the first time the ListView is shown, on successive runs, it works fine. If I remove the template from the ListView, then the raw data shows up as expected, only upon adding the HtmlControl it fails the first. Any idea what might be wrong? This is

Metro Style App HTML/JS writing local files

。_饼干妹妹 提交于 2019-12-06 22:03:38
I've built an app for Windows Store that writes to local files using Windows.Storage.FileIO (createFileAsync, readTextAsync and writeTextAsync). My plan is to use the file as a simple database (the data is simply JSON formatted user information). Is this a bad idea? Are the files written this way really persistent (or are they deleted when the app is updated)? Can the user themselves delete them (for example through deleting cookies/temp internet files or the likes)? I'm just wondering how files written to the disk locally by apps are treated by the "Metro" environment... devhammer The

Windows 8 how to choose which camera to initialize

扶醉桌前 提交于 2019-12-06 20:37:27
I am developing a Windows Store App and I am using the Camera and Microphone capabilities. I would like the back camera to be initialized but the examples that I have found always initialize the front camera. Here's the code that I have: Windows.Devices.Enumeration.DeviceInformation.findAllAsync(Windows.Devices.Enumeration.DeviceClass.videoCapture) .done(function (devices) { if (devices.length > 0) { // Using Windows.Media.Capture.MediaCapture APIs to stream from webcam mediaCaptureMgr = new Windows.Media.Capture.MediaCapture(); mediaCaptureMgr.initializeAsync().done(initializeComplete,