If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Remote N.aN problem when calculating a form total

I have this form I picked up. I basically want the javascript to take a text user-input amount and then add on a 'card fee', which is assigned by either one of two sums (user selected radio box).

Of the two radio boxes assigning the 'card fee' The first choice would be a fixed variable of 1, and the other being of percentage variable = 3% of the 'user-input'.

Then when a user presses a submit button 'Calculate Total' it should generate the sum of the two - the user input + card fee.

This coding below was provided by the WORLDPAY support site and I have tried my best to customise it. I can get the 'CALCULATE TOTAL' to work locally/client-side on my Mac/Win7 and provide me with a correct numerical result (incl. fixed fee or %).

However, when I transfer the same page/file online the 'Total' box displays the "N.aN" when you click on 'Calculate Total' - which I gather means Not A Number??? But why does it work locally and not remotely.