Hi!
Where is regex when you need it?
This preposterous expression works even if the existing expression is already currency formatted. I put it on the OnLostFocus handler of the text field:
$[[ ((This.text.replace('$' , '').replace(',' , '')*1).toFixed(0)*1).toLocaleString() ]].[[(This.text.replace('$' , '').replace(',' , '')*1).toFixed(2).slice(-2)]]
Edit: oh: found a bug: if the source decimal place is .5 or over, you end up with a number one dollar too big. Use this instead.
$[[ Math.floor(This.text.replace('$' , '').replace(',' , '')).toLocaleString() ]].[[(This.text.replace('$' , '').replace(',' , '')*1).toFixed(2).slice(-2)]]
Test out the Live sample to make sure there are no bugs.
[Another edit] You can make this field less error prone if you restrict the characters that can be entered into it. This post will let you choose which specific keystrokes are allowed into the field. The list is long, since you’ll want the arrow keys, ctrl+c, etc., to all work, but I’ve done most of that for you. (You will need to add a comma and the dollar sign to the list so your text enterer can enter those.)