Alberto da Silva
Posts: 0
Joined: Thu Jan 26, 2012 12:38 am

Setting value of a Label through Custom Javascript

Dear Tiggzi,

I would like to click on a button and then set the value of a label through custom javascript.

What is the code that I should use to set a value of a label through javascript? I tried this but it didn't work:

var myvalue = 10;
var myResult = Tiggr ('lbl_BMI_Result');
myResult = myvalue;

Thanks,

Alberto da Silva

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Setting value of a Label through Custom Javascript

Tiggr('id') returns a jQuery reference so to set the label would be like this Tiggr('id').text('new label');

Return to “Issues”