• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Format currency number in javascript.

Format currency number in javascript. 4 years 6 months ago #40739

  • bndesign
  • bndesign's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi!

I am not able to format a currency value.
I tried to format with .toLocaleString and other ways but without success.

Below are the examples used:

Exemplo 1 -

document.getElementById ('test_soma'). value = parseFloat (document.getElementById ('test_soma'). value) .toLocaleString ('en-us', {style: "currency", currency: "BRL"});

Exemplo 2 -

document.getElementById ('test_value'). value = (parseFloat (resulty.value) .toLocaleString ('en-us',
{minimumFractionDigits: 2, maximumFractionDigits: 2}));

Please help me.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!