I should note that I already declared the field as a variable like this:
var myAttribute = Xrm.Page.getAttribute("fieldname");
myAttribute.setValue(parseFloat(eval(null)));
I understand your code being correct but it doesn't work for a currency field from what I can tell. Any other options?