I am having trouble replacing a fullstop with "".

I've tried
commission=commission.replace(".","");
but i get the javascript error :
message object does not support this property or method
Is anyone able to advise me on this....

Thanks