<?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 //Saves the value of clicks in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Intel-XDK-and-cookie/m-p/1010728#M34050</link>
    <description>&lt;PRE class="brush:jscript;"&gt;//Saves the value of clicks to a cookie var called clickCke
var cookieTimeout = 15;

intel.xdk.cache.setCookie("clickCke", clicks, cookieTimeout);

//Read back the value
intel.xdk.cache.getCookie("clickCke");&lt;/PRE&gt;

&lt;P&gt;Don't try and access the cookie before the app.Ready event fires.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jul 2015 13:21:32 GMT</pubDate>
    <dc:creator>SithLord</dc:creator>
    <dc:date>2015-07-15T13:21:32Z</dc:date>
    <item>
      <title>Intel XDK and cookie</title>
      <link>https://community.intel.com/t5/Software-Archive/Intel-XDK-and-cookie/m-p/1010727#M34049</link>
      <description>&lt;P&gt;I need code for saveing my apk. I find this&amp;nbsp;https://software.intel.com/en-us/node/492874 and&amp;nbsp;https://software.intel.com/en-us/node/492856 how i put in to my code ? I need save click ... pleas help :/&lt;/P&gt;

&lt;PRE class="brush:xml;"&gt;&amp;lt;script type="text/javascript"&amp;gt;
    var clicks = 0;
    var pocetDniPreUchovanieCookies = 31;
    function onClick() {
        clicks += 1;
        document.getElementById("clicks").innerHTML = clicks;

        if(clicks === 1000){
           document.location = "win.html";
        }
    };
    &amp;lt;/script&amp;gt;

&amp;lt;center&amp;gt;&amp;lt;p style="color:#fff; font-family:clicker";&amp;gt;Clicks: &amp;lt;a id="clicks"&amp;gt;0&amp;lt;/a&amp;gt; / &amp;lt;a style="color:#560606;"&amp;gt;1000&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/center&amp;gt;

&amp;lt;center&amp;gt;&amp;lt;img src="img/chest.png" onClick="onClick() , intel.xdk.cache.getCookie('clicks');"&amp;gt;&amp;lt;/img&amp;gt;&amp;lt;/center&amp;gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2015 06:56:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Intel-XDK-and-cookie/m-p/1010727#M34049</guid>
      <dc:creator>Adam_t_1</dc:creator>
      <dc:date>2015-07-15T06:56:21Z</dc:date>
    </item>
    <item>
      <title>//Saves the value of clicks</title>
      <link>https://community.intel.com/t5/Software-Archive/Intel-XDK-and-cookie/m-p/1010728#M34050</link>
      <description>&lt;PRE class="brush:jscript;"&gt;//Saves the value of clicks to a cookie var called clickCke
var cookieTimeout = 15;

intel.xdk.cache.setCookie("clickCke", clicks, cookieTimeout);

//Read back the value
intel.xdk.cache.getCookie("clickCke");&lt;/PRE&gt;

&lt;P&gt;Don't try and access the cookie before the app.Ready event fires.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2015 13:21:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Intel-XDK-and-cookie/m-p/1010728#M34050</guid>
      <dc:creator>SithLord</dc:creator>
      <dc:date>2015-07-15T13:21:32Z</dc:date>
    </item>
    <item>
      <title>Quote:SithLord wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/Intel-XDK-and-cookie/m-p/1010729#M34051</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;SithLord wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;//Saves the value of clicks to a cookie var called clickCke
var cookieTimeout = 15;

intel.xdk.cache.setCookie("clickCke", clicks, cookieTimeout);

//Read back the value
intel.xdk.cache.getCookie("clickCke");&lt;/PRE&gt;

&lt;P&gt;Don't try and access the cookie before the app.Ready event fires.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;I add to my script but&amp;nbsp;but it does not work. Pleas help.&lt;/P&gt;

&lt;PRE class="brush:xml;"&gt;&amp;lt;script type="text/javascript"&amp;gt;
    var clicks = 0;
	var cookieTimeout = 15;
    function onClick() {
        clicks += 1;
        document.getElementById("clicks").innerHTML = clicks;
		intel.xdk.cache.setCookie("clickCke", clicks, cookieTimeout);
		intel.xdk.cache.getCookie("clickCke");
	
        if(clicks === 1000){
           document.location = "win.html";
        }
    };
    &amp;lt;/script&amp;gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2015 16:49:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Intel-XDK-and-cookie/m-p/1010729#M34051</guid>
      <dc:creator>Adam_t_1</dc:creator>
      <dc:date>2015-07-15T16:49:38Z</dc:date>
    </item>
  </channel>
</rss>

