Alessandro Recano
Posts: 0
Joined: Sat Jun 28, 2014 3:00 pm

String comparing on a Click Event

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!

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

String comparing on a Click Event

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...

Alessandro Recano
Posts: 0
Joined: Sat Jun 28, 2014 3:00 pm

String comparing on a Click Event

Thank you!! :-)

Return to “Issues”