Reply To: Displaying Tax free price

I resolved by adding a small jquery script in my form page :

// DISPLAYING TAX FREE PRICE

//global var
var fullPrice="0"; // price including tax to detect any price change

// Displaying taxFreePrice
function taxFreePriceDisplay(origin,dest) {
// origin : DOM element with price including tax (string)
// dest : DOM element to display tax free price (string)

// parsing price string
fullPrice_str=$(origin).text();

// Detecting if the price including tax has changed
if(fullPrice_str!=fullPrice){
fullPrice=fullPrice_str;
// Calculating and formatting tax free price
taxFreePrice=toStringPrice(toTaxFree(toFloatPrice(fullPrice_str,' ',',',1),7),' ',',',' €');
// Appending destination DOM element
$(dest).empty().append(taxFreePrice);
}
}

// Set interval to refresh tax free price
setInterval(function() { taxFreePriceDisplay('#showPrice','strong.ht'); }, 1000);

// Calculate tax free price
function toTaxFree(price,rate){
// price : price including tax (float)
// rate : tax rate (float)
// return : float
tfprice=price*100/(100+rate);
return tfprice.toFixed(2);
}

// Transform string price into a float number
function toFloatPrice(price,th_sep,dec_sep,wp){
// price : price (string)
//th_sep : thousands separator (string)
//dec_sep : decimal separator (string)
//wp : 0 if no whitespace before currency symbol
// 1 if whitespace before currency symbol
// return : float
fprice=price.substr(0,price.length-(1+wp));
fprice=fprice.replace(dec_sep,'.');
fprice=fprice.replace(th_sep,'');
return parseFloat(fprice);
}

// Format price to display
function toStringPrice(price,th_sep,dec_sep,cur){
// price : price (string)
//th_sep : thousands separator (string)
//dec_sep : decimal separator (string)
//cur : currency symbol, you can include whitespace before (string)
// return : float
sprice=price.toString().replace('.',dec_sep);
sprice=sprice.replace(/\B(?=(\d{3})+(?!\d))/g, th_sep);
return sprice+cur;
}