Organizational Research By

Surprising Reserch Topic

passing some argument to the callback function of WinJs xhr

In Windows 8, I am using WinJs.xhr in a loop to download some content, and as it arrives afterward to the "done callback", I would like to pass an argument to retrieve the element who call xhr.

    for (var k = 0 ; k < 9; k++) {
                        var title = dataArray[k].name;
                        if (title != null)
                            url = monUrl+ title;

                        WinJS.xhr({ url: url, responseType: "responseXML" })
   .done(function complete(result) {

    //I would like to retrieve the right title here for example
       var dataArray = new Array();
       var xml = result.responseXML;

Thank you for your help

asked Sep 13, 2013 in Microsoft Window 8 by rajesh
edited Sep 12, 2013
0 votes

Related Hot Questions

Government Jobs Opening