Link to home
Start Free TrialLog in
Avatar of kristinc
kristinc

asked on

VbScript vs Javascript

How do I convert this VBScript to Javascript?

if frmOrderDetails.prov_tax.value = "AB" then
     frmOrderDetails.tax.value = Round(CDbl(frmOrderDetails.sub_total.value) * 0.07,2)
elseif frmOrderDetails.prov_tax.value = "BC" then
     frmOrderDetails.tax.value = Round(CDbl(frmOrderDetails.sub_total.value) * 0.14,2)
elseif frmOrderDetails.prov_tax.value = "YK" then
     frmOrderDetails.tax.value = Round(CDbl(frmOrderDetails.sub_total.value) * 0.07,2)
end if

Any suggestions?
Avatar of kristinc
kristinc

ASKER

I am actually looking more at the Round and CInt functions and how go about doing this in Javascript.
ASKER CERTIFIED SOLUTION
Avatar of ahosang
ahosang
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial