Apologies if this is obvious, but nothing I seem to do is working for me. Also, apologies if this is in the wrong place!
I have a website that incorporates a shopping cart. The prices , in the cart are formatted in GBP. The eventual output of the cart is being passed through to my payment option, via a form, as [ORDER_NO] and [PRICE].
All is well with the Order No, but the Price field seems to be displayed with 3 decimal places (e.g. £150.000) instead of 2! Is there a way of defining the number of decimal places to only 2? I've tried using the toFixed option, but I can't seem to make it work! Grrrrr!
My code, for that part of the form, is as follows:
<!-- This defines the fixed products price as an example. -->
document.form.amount.value = x;
<!-- A table displaying the fixed example product. -->
<table border="2" cellpadding="3" align="center">
Anyone have any bright ideas? I'm sure I'm missing something, but I can't think what?