Design Introduction “Air” Styles Mobile Design Principles Styles UX Overview Design Patterns UI Components for Tizen App Design 2.3 TV Design Principles Styles UX Overview Patterns UI Components Wearable Development Tizen Studio Overview Download Tizen Extensions for Visual Studio Family IoT extension SDK Docs Blog Blog Announcing the Tizen Studio 3.7 Release Announcing the Tizen Studio 3.1 Release Community Forums General Support Tizen .NET Web Application Development Native Application Development SDK & IDE Design Introduction “Air” Styles Mobile Design Principles Styles UX Overview Design Patterns UI Components for Tizen App Design 2.3 TV Design Principles Styles UX Overview Patterns UI Components Wearable Development Tizen Studio Overview Download Tizen Extensions for Visual Studio Family IoT extension SDK Docs Blog Blog Announcing the Tizen Studio 3.7 Release Announcing the Tizen Studio 3.1 Release Community Forums General Support Tizen .NET Web Application Development Native Application Development SDK & IDE
Touch events and cookies
I’m trying to change the background colour of the watch face on touch event. I want to record the user choice and use that after the user turns off the device. I implemented touch events with no problems and they work, but cookies won’t work.
this is the code :
var bottone = document.getElementById(‘bottone‘);
/* touchend event */
bottone.addEventListener(‘touchend’, function() {
color = getCookie(“color”);
console.log(color);
if (color == null || color == 3){
document.getElementById(“overlay”).style.backgroundImage = “url(‘/image/bg_1.png’)”;
setCookie(‘color’,’1′,365);
}else if (color == 1){
document.getElementById(“overlay”).style.backgroundImage = “url(‘/image/bg_2.png’)”;
setCookie(‘color’,’2′,365);
}else if (color == 2){
document.getElementById(“overlay”).style.backgroundImage = “url(‘/image/bg_3.png’)”;
setCookie(‘color’,’3′,365);
}
}, false);
the console.log(color) return null every time I click id=”bottone”
This is the code for cookies:
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio