- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need code for saveing my apk. I find this https://software.intel.com/en-us/node/492874 and https://software.intel.com/en-us/node/492856 how i put in to my code ? I need save click ... pleas help :/
<script type="text/javascript"> var clicks = 0; var pocetDniPreUchovanieCookies = 31; function onClick() { clicks += 1; document.getElementById("clicks").innerHTML = clicks; if(clicks === 1000){ document.location = "win.html"; } }; </script> <center><p style="color:#fff; font-family:clicker";>Clicks: <a id="clicks">0</a> / <a style="color:#560606;">1000</a></p></center> <center><img src="img/chest.png" onClick="onClick() , intel.xdk.cache.getCookie('clicks');"></img></center>
- Tags:
- HTML5
- Intel® XDK
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
//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");
Don't try and access the cookie before the app.Ready event fires.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SithLord wrote:
//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");Don't try and access the cookie before the app.Ready event fires.
I add to my script but but it does not work. Pleas help.
<script type="text/javascript"> 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"; } }; </script>

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page