Currency format for Europe is different (in this case – Portugal – the format is “000 000 000,00″).
How can I change the javascript code to make the change?
I think this code would work but I cannot test it:
//<![CDATA[
function sgjsFormatCurrency(event){
if(typeof event == “undefined”){event = window.event;}
var target = getEventTarget(event);
if(target.value == “”)return;
num = (new String(target.value)).replace(‘€’,”);
num = (new String(num)).replace(‘ ‘,”);
num = (new String(num)).replace(‘,’,’.’);
if(isNaN(num))num = “0″;
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10) cents = “0″ + cents;
for (var i = 0; i