Page 1 of 1

String comparing on a Click Event

Posted: Sat Jun 28, 2014 3:00 pm
by Alessandro Recano

Hello everyone. I have troubles with a simple javascript code on Click event of a mobile list item.

The code must compare two strings and make the button's behavior different according with the string's value.

What's wrong with what I wrote?

var label = Appery('lbl_sms');
var codice = "codice";

if(label.text() == codice)
{
alert("strings got the same value!");
}
else alert("strings are different!");

Thanks in advance!


String comparing on a Click Event

Posted: Sun Jun 29, 2014 12:31 am
by Illya Stepanov

Hi Alessandro,

In the most cases it is a good practise to debug your code first, as it is described here:
:: http://devcenter.appery.io/documentat...

and look for the errors messages in the browser console - http://devcenter.appery.io/documentat...


String comparing on a Click Event

Posted: Mon Sep 22, 2014 6:17 pm
by Alessandro Recano

Thank you!! :-)