I'm a novice. I did research and was able to write this code that works great. The only issue is that when the user types the amount there are no commas separating the thousands, millions, etc. Does anyone have any ideas on modifying or adding something to code so that when the user types numbers the commas are added automatically? See code and screenshot below.
$w.onReady(function () {
$w("#input247").onChange((Event) => {
let price = Number($w('#input247').value);
let traditionalPercent = Number ($w('#text556').text);
let buyersAgentPercent = Number ($w('#text557').text);
$w("#input247").value = null;
$w('#text548').text = '$' + price.toLocaleString();
$w('#text549').text = '$' + (price * traditionalPercent).toLocaleString();
$w('#text550').text = '$' + (price * buyersAgentPercent).toLocaleString();
$w('#text551').text = '$' + (price * traditionalPercent - price * buyersAgentPercent).toLocaleString();
})})