Hi all,
I have the following code and it seems to be breaking after the .toFixed(). The first message box will display a number but the second message box won't display anything at all. Wondering if toFixed() doesn't work because labelvalue contains a string?
labelValue = String(monthObj.rawValue - lastMonthEle.rawValue);
xfa.host.messageBox(labelValue);
LabelRounded = labelValue.toFixed(2);
xfa.host.messageBox(LabelRounded);
Views
Replies
Total Likes
Hi,
toFixed does not work on String Values.
Regards--
Chalukya.
Thanks
Views
Replies
Total Likes
you can convert your textField data to Numeric data and then use toFixed();
var NumericValue = parseFloat( this.rawValue );
app.alert(NumericValue.toFixed());
this.rawValue = NumericValue.toFixed() ;
this.rawValue is my textField data.
Regards--
Chalukya
Views
Replies
Total Likes