Replace character in submit form (Javascript)
<p>I am trying to make a simple replacement in a javascript form.</p>

<p>The form is submitting invoicenumber and amount to external payment gateway. The problem is the payment gateway doesn't accept , (komma) as seperator between units (ie. doller,cent) but only (dollar.cent).</p>

<p>I want to make sure it accepts both characters . (dot) AND , (komma) so customer can use both and the form will just send . to external server.</p>

<p>Anybode that can assist?</p>

<p>UPDATE:</p>

<p>This is current javascript code:</p>

<p>`</p>

<pre><code>    function startPayment() {
        var objForm = document.getElementById("ePay");

        if (objForm.merchantnumber.value.length &lt; 7) {
            alert("Please enter your merchant!");
            return false;
        }

        paymentwindow = new PaymentWindow({

            'windowstate': 1,

            'paymentcollection': 1,

            'language': 1,

            'merchantnumber': objForm.merchantnumber.value,

            'amount': objForm.amount.value * "100",

            'currency': "208",

            'orderid': objForm.orderid.value,

        });

        paymentwindow.open();
    }



    function init() {
        var sURL = String(window.location);
        var arrURL = sURL.split("/");
        var sAcceptURL = "";
        var objForm = document.getElementById("ePay");
        var n;

        for (n = 0; n &lt; arrURL.length - 1; n++)
            sAcceptURL += arrURL[n] + "/";

        objForm.cancelurl.value = sURL;
        objForm.accepturl.value = sAcceptURL + "accept.html";
    }

&lt;/script&gt;`
</code></pre>

<p>This is the HTML code:</p>

<pre><code>&lt;tr&gt;
&lt;td&gt;Amount:&lt;/td&gt;
&lt;td&gt;
&lt;input type="text" name="amount" value="" style="width: 200px;" /&gt;
&lt;/td&gt;
&lt;td&gt;
Amount to pay
&lt;/td&gt;
</code></pre>
