hi guys, i’m building a little app and i need to handle javascript error or success and showing them in the ui for a time like 2s
function sendMessage(){
messages.save({
message: "joyeux anniversai",
senderid: "houhou",
receiverid: "haha",
rooms: chatRooms
}, {
success: function(messages) {
console.log('messages sended')
// Do something and show file as been saved
},
error: function(messages, error) {
console.log('error sending the message')
// The save failed.
// Do something and show that it failed to save the file
}
})
}
i have a WhileTrue condition that i need to activate when something is saved or not
<WhileTrue ux:Name="lou">
<Change loudou.Opacity="1"/>
</WhileTrue>
so i need to activate this condition for 2 secondes , how can i do this.