You need to sign in to do that
Don't have an account?
sumit pawar
how do i achieve below functionality using javascript?
i have two text boxes with number data type.
weight in lbs
weight in kgs
i want to convert from lbs to kgs and kgs to lbs...
when i will enter data in lbs its kgs value should display and kg textbox will get disable.
and same vice versa.
i used disabled in inputcheckbox but its not fuctioning correctly..
can u pls suggest me how to do this in javascript..?
weight in lbs
weight in kgs
i want to convert from lbs to kgs and kgs to lbs...
when i will enter data in lbs its kgs value should display and kg textbox will get disable.
and same vice versa.
i used disabled in inputcheckbox but its not fuctioning correctly..
can u pls suggest me how to do this in javascript..?
function kToLbs(pK) {
var nearExact = pK/0.45359237;
var lbs = Math.floor(nearExact);
return {
pounds: lbs,
};
}
var imperial = kToLbs(10);
alert("10 kg = " + imperial.pounds + " lbs");
function lbsToKg(imperial) {
var pounds = imperial.pounds;
return pounds * 0.45359237;
}
var kg = lbsToK({ pounds: 10, ounces: 8 });
alert("10 lbs = + kg");
and my field names are:- data type(number)
formRec.Weight_lbs__c
formRec.Weight_in_kgs__c