|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
setlocale
I have a problem when doing a arithmetic calculation on 2 values with the Polish Regional settings on Windows 2000. So in the code I have TotalValue = ((Txt_Qty.value) * (Txt_Price.value)) Txt_ExtendedPricePerLine.value = TotalValue So if the above is calculated with the following 2 values Txt_Qty.value = 56, Txt_Price.value = 52.45 then Txt_ExtendedPricePerLine.value gets a value of 2937,2 How can I get this changed to 2937.2? I used setLocale("en-gb") but this does not work. Your help is much appreciated. Kevin. Kevin Humphreys wrote on 14 mrt 2005 in
microsoft.public.inetserver.asp.general: > Hi There, What is this .value business? > I have a problem when doing a arithmetic calculation on 2 values with > the Polish Regional settings on Windows 2000. > > So in the code I have > TotalValue = ((Txt_Qty.value) * (Txt_Price.value)) > Txt_ExtendedPricePerLine.value = TotalValue > > So if the above is calculated with the following 2 values > Txt_Qty.value = 56, Txt_Price.value = 52.45 then > Txt_ExtendedPricePerLine.value gets a value of 2937,2 > > How can I get this changed to 2937.2? We are talking serverside ASP vbscript? response.write replace(price,",",".") -- Evertjan. The Netherlands. (Replace all crosses with dots in my emailaddress)
Other interesting topics
|
|||||||||||||||||||||||