<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic When run on the device, using in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917775#M12949</link>
    <description>&lt;P&gt;When run on the device, using debug it does nto work causing a Network Error.&lt;/P&gt;

&lt;P&gt;Network connections was up&lt;/P&gt;

&lt;P&gt;It just seems like the XMLHttpRequest does not work with Intel XDK at all :(. This is the app header:&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;
&amp;lt;meta http-equiv="Content-type" content="text/html; charset=utf-8"&amp;gt;
&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"&amp;gt;
&amp;lt;meta name="apple-mobile-web-app-capable" content="yes"&amp;gt;
&amp;lt;script src="intelxdk.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script src="xhr.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;meta http-equiv="Pragma" content="no-cache"&amp;gt;
&amp;lt;script type="text/javascript" charset="utf-8" src="intelxdk.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript" src="js/gingerlib.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript" language="javascript"&amp;gt;
    // This event handler is fired once the intel libraries are ready
    function onDeviceReady() {
        //hide splash screen now that our app is ready to run
        intel.xdk.device.hideSplashScreen();
        setTimeout(function () {
            $.ui.launch();
        }, 50);
    }
    //initial event handler to detect when intel is ready to roll
    document.addEventListener("intel.xdk.device.ready", onDeviceReady, false);
&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript" style=""&amp;gt;

&amp;lt;/script&amp;gt;
&amp;lt;script src="js/appframework.ui.min.js"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script&amp;gt;
    $.ui.autoLaunch = false;
    $.ui.useOSThemes = true; //Change this to false to force a device theme
    $.ui.blockPageScroll();
    $(document).ready(function () {
        //if ($.ui.useOSThemes &amp;amp;&amp;amp; !$.os.ios &amp;amp;&amp;amp; $("#afui").get(0).className !== "ios")
          //  $("#afui").removeClass("ios");
    });
&amp;lt;/script&amp;gt;
&amp;lt;link href="css/icons.css" rel="stylesheet" type="text/css"&amp;gt;
&amp;lt;link href="css/af.ui.css" rel="stylesheet" type="text/css"&amp;gt;&lt;/PRE&gt;

&lt;P&gt;That function was in gingerlib.js&lt;/P&gt;</description>
    <pubDate>Tue, 18 Mar 2014 21:01:56 GMT</pubDate>
    <dc:creator>GingerGeek</dc:creator>
    <dc:date>2014-03-18T21:01:56Z</dc:date>
    <item>
      <title>Noob question r.e</title>
      <link>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917772#M12946</link>
      <description>&lt;PRE class="brush:jscript;"&gt;
This is the code:
function apiCall(action, params) {
    var callURL = siteURL + apiURL + "action=" + action + "&amp;amp;" + params, xmlHttp = null;

    xmlHttp = new XMLHttpRequest();
    xmlHttp.open("GET", callURL, false);
    xmlHttp.send();
    return xmlHttp.responseText;
}&lt;/PRE&gt;

&lt;P&gt;This is the error:&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;
Uncaught NetworkError: A network error occurred. /C:/Users/MYUSERNAME/AppData/Local/Intel/XDK/xdk/components/client/emulator/ripple.js:60282
(anonymous function) /C:/Users/MYUSERNAME/AppData/Local/Intel/XDK/xdk/components/client/emulator/ripple.js:60282
apiCall gingerlib.js:17
doLogin gingerlib.js:26
onclick index.html:79&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2014 19:22:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917772#M12946</guid>
      <dc:creator>GingerGeek</dc:creator>
      <dc:date>2014-02-17T19:22:54Z</dc:date>
    </item>
    <item>
      <title>bump</title>
      <link>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917773#M12947</link>
      <description>&lt;P&gt;bump&lt;/P&gt;</description>
      <pubDate>Sun, 09 Mar 2014 12:17:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917773#M12947</guid>
      <dc:creator>GingerGeek</dc:creator>
      <dc:date>2014-03-09T12:17:49Z</dc:date>
    </item>
    <item>
      <title>Sorry, but not much to go on</title>
      <link>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917774#M12948</link>
      <description>&lt;P&gt;Sorry, but not much to go on with the info you've provided. Does this work in a standard browser? Did you try it using an Android 4.x device attached with USB and using the Debug tab? Nothing about your code is XDK-specific. Was your network connection working when you performed the test?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 04:00:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917774#M12948</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2014-03-12T04:00:52Z</dc:date>
    </item>
    <item>
      <title>When run on the device, using</title>
      <link>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917775#M12949</link>
      <description>&lt;P&gt;When run on the device, using debug it does nto work causing a Network Error.&lt;/P&gt;

&lt;P&gt;Network connections was up&lt;/P&gt;

&lt;P&gt;It just seems like the XMLHttpRequest does not work with Intel XDK at all :(. This is the app header:&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;
&amp;lt;meta http-equiv="Content-type" content="text/html; charset=utf-8"&amp;gt;
&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"&amp;gt;
&amp;lt;meta name="apple-mobile-web-app-capable" content="yes"&amp;gt;
&amp;lt;script src="intelxdk.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script src="xhr.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;meta http-equiv="Pragma" content="no-cache"&amp;gt;
&amp;lt;script type="text/javascript" charset="utf-8" src="intelxdk.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript" src="js/gingerlib.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript" language="javascript"&amp;gt;
    // This event handler is fired once the intel libraries are ready
    function onDeviceReady() {
        //hide splash screen now that our app is ready to run
        intel.xdk.device.hideSplashScreen();
        setTimeout(function () {
            $.ui.launch();
        }, 50);
    }
    //initial event handler to detect when intel is ready to roll
    document.addEventListener("intel.xdk.device.ready", onDeviceReady, false);
&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript" style=""&amp;gt;

&amp;lt;/script&amp;gt;
&amp;lt;script src="js/appframework.ui.min.js"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script&amp;gt;
    $.ui.autoLaunch = false;
    $.ui.useOSThemes = true; //Change this to false to force a device theme
    $.ui.blockPageScroll();
    $(document).ready(function () {
        //if ($.ui.useOSThemes &amp;amp;&amp;amp; !$.os.ios &amp;amp;&amp;amp; $("#afui").get(0).className !== "ios")
          //  $("#afui").removeClass("ios");
    });
&amp;lt;/script&amp;gt;
&amp;lt;link href="css/icons.css" rel="stylesheet" type="text/css"&amp;gt;
&amp;lt;link href="css/af.ui.css" rel="stylesheet" type="text/css"&amp;gt;&lt;/PRE&gt;

&lt;P&gt;That function was in gingerlib.js&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2014 21:01:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917775#M12949</guid>
      <dc:creator>GingerGeek</dc:creator>
      <dc:date>2014-03-18T21:01:56Z</dc:date>
    </item>
    <item>
      <title>Put your code inside the</title>
      <link>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917776#M12950</link>
      <description>&lt;P&gt;Put your code inside the onDeviceReady() function, otherwise it will run before the underlying XDK subsystem is ready.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2014 00:47:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917776#M12950</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2014-03-20T00:47:50Z</dc:date>
    </item>
    <item>
      <title>It is only intitiated on a</title>
      <link>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917777#M12951</link>
      <description>&lt;P&gt;It is only intitiated on a user clicking a button, so it can't be before onDeviceReady().&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2014 19:46:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917777#M12951</guid>
      <dc:creator>GingerGeek</dc:creator>
      <dc:date>2014-03-20T19:46:27Z</dc:date>
    </item>
    <item>
      <title>Your inclusion of gingerlib</title>
      <link>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917778#M12952</link>
      <description>&lt;P&gt;Your inclusion of gingerlib.js must contain code that is getting executed and causing the error before the underlying device and xdk JS files are ready. Turn your gingerlib.js file into definition code, only and put the init code inside of it into onDeviceReady().&lt;/P&gt;</description>
      <pubDate>Fri, 04 Apr 2014 01:01:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917778#M12952</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2014-04-04T01:01:28Z</dc:date>
    </item>
    <item>
      <title>I've changed some stuff</title>
      <link>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917779#M12953</link>
      <description>&lt;P&gt;I've changed some stuff around:&lt;/P&gt;

&lt;P&gt;This is my header:&lt;/P&gt;

&lt;PRE class="brush:xml;"&gt;&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv="Content-type" content="text/html; charset=utf-8"&amp;gt;
&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"&amp;gt;
&amp;lt;meta name="apple-mobile-web-app-capable" content="yes"&amp;gt;
&amp;lt;meta http-equiv="Pragma" content="no-cache"&amp;gt;
&amp;lt;script&amp;gt;
window['_native_XMLHttpRequest'] = window.XMLHttpRequest; // xhr.js store it too, but for good measure we do it on our own
&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript" charset="utf-8" src="intelxdk.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script src="xhr.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript" language="javascript"&amp;gt;
    var isIntel=window.intel&amp;amp;&amp;amp;window.intel.xdk
    // This event handler is fired once the intel libraries are ready
    function onDeviceReady() {
        //hide splash screen now that our app is ready to run
        intel.xdk.device.hideSplashScreen();
        setTimeout(function () {
            $.ui.launch();
        }, 50);
        
    }
    //initial event handler to detect when intel is ready to roll
    document.addEventListener("intel.xdk.device.ready", onDeviceReady, false);
&amp;lt;/script&amp;gt;
&amp;lt;script src="js/appframework.ui.min.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;
    if(isIntel)
        $.ui.autoLaunch = false;
    $.ui.useOSThemes = true; //Change this to false to force a device theme
    $.ui.blockPageScroll();
    $(document).ready(function () {
        if ($.ui.useOSThemes &amp;amp;&amp;amp; (!$.os.ios||$.os.ios7))
            $("#afui").removeClass("ios");
    });
&amp;lt;/script&amp;gt;
&amp;lt;link href="css/icons.css" rel="stylesheet" type="text/css"&amp;gt;
&amp;lt;link href="css/af.ui.css" rel="stylesheet" type="text/css"&amp;gt;

&amp;lt;script src="js/myScript.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;/head&amp;gt;&lt;/PRE&gt;

&lt;P&gt;Then, this is a fucntion in my Javascript file myScript&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;function apiCall(action, params) {
    var callURL = siteURL + apiURL + "action=" + action + "&amp;amp;" + params; 
    xmlHttp = null;
    xmlHttp = new window['_native_XMLHttpRequest'];
    xmlHttp.open("GET", callURL, false);
    xmlHttp.onreadystatechange = function() { 
        if (xmlHttp.readyState == 4) {  //Request is complete
            if(xmlHttp.status == 200) {  //Response is ready
                alert("Request succeeded. Data:  "+xhr.responseText);
            } else {
                alert("NetError:"+xmlHttp.readyState+" "+xmlHttp.status);
                return null;
            }
        }
    }
    xmlHttp.send(null);
    return xmlHttp.responseText;
}&lt;/PRE&gt;

&lt;P&gt;I always get "NetError: 4 0"&lt;/P&gt;

&lt;P&gt;The only thing in the init of the Javascript file is declaring two variables.&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2014 18:08:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917779#M12953</guid>
      <dc:creator>GingerGeek</dc:creator>
      <dc:date>2014-05-12T18:08:09Z</dc:date>
    </item>
    <item>
      <title>Are you able to build a test</title>
      <link>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917780#M12954</link>
      <description>&lt;P&gt;Are you able to build a test version that removes the suspect libraries and then add them back, one by one (or remove, one by one) to determine which might be causing the problem? The trouble is there are many unknowns in your code, so it needs to be isolated before we can really start to provide a fix.&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2014 01:07:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Noob-question-r-e/m-p/917780#M12954</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2014-05-15T01:07:07Z</dc:date>
    </item>
  </channel>
</rss>

