Hi there,
I am having a Javascript problem and any help would be apprecated.
I am trying to test the input for if length = 1 then add on a 0 as this would mean if the user wanted £1.20 if would come out as £1.20 and not £1.2 as it is at the moment.
I've tried concatenating the variables together and then putting them back into the variable but it still comes out at 1 decimal place.
I am testing this on the form validation page, not the form processing page at current.
if(cpence.value.length == 1){
cpence + 0;}
Also trying testing it before it adds it to the database, but still no luck.
if($pence.value.length == 1){
$pence . "0";}
Many thanks