javascript append appearing twice
<p>Here's my problem I have this javascript</p>

<pre><code>if (exchRate != "") {

function roundthecon() {
var value = Math.round(exchRate*Math.pow(10,2)) / Math.pow(10,2);
$('.tablenotes &gt; p &gt; strong ').append(value);
}

function addCommas(nStr) {
nStr += '';
x = nStr.split('.');
x1 = x[0];
x2 = x.length &gt; 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}

return x1 + x2;
}


        // When the document is loaded..
        $(document).ready(function(){


                // Grab an array of the table cells
                $('.evenprop table tr td:not(.title)').each(function(){

                        // Calculate the pound price
                        var v_euro = $(this).html();

                        if (v_euro != "N/A") {

                        var v_euro = v_euro.replace(/,/g,'');
                        var v_euro = v_euro.replace(/\u20AC/g, '');
                        var v_euro = v_euro.replace(/&amp;pound;/g, '');

                        var v_pound = Math.round(v_euro / exchRate);
                        v_pound = addCommas(v_pound);

                        // Create a new span element for the pound


                        // Insert it at the end of the table cell

                        if (exchRate == &lt;%= Session("xch_dollar") %&gt;) {
                        $(this).prepend("$");
                        }
                        if (exchRate == &lt;%= Session("xch_ntl") %&gt;) {
                        $(this).prepend("X");
                        }
                        if (exchRate == &lt;%= Session("xch_euro") %&gt;) {
                        $(this).append("&amp;euro;");
                        }

                        var o_span = $('&lt;span/&gt;').html(' &lt;span style="font-weight:normal;" id="exchRate"&gt;(&amp;pound;' + v_pound + ')&lt;/span&gt;');
                        $(this).append(o_span);

                        }
                });

        });

        }
</code></pre>

<p>And this is my html in the page</p>

<pre><code>&lt;div class="tablenotes"&gt;

&lt;p&gt;&lt;span class="tariffnote"&gt;Weekly price in Euros.&lt;/span&gt; &amp;pound; in brackets are approximate sterling equivalent based on &lt;strong&gt;&amp;pound;1 = 
  &lt;script type="text/javascript"&gt;roundthecon()&lt;/script&gt;&lt;noscript&gt;&lt;%= Session("xch_euro") %&gt;&lt;/noscript&gt;&amp;euro;&lt;/strong&gt;    &lt;/p&gt;


&lt;/div&gt;
</code></pre>

<p>And the <code>exchRate = 1.1986</code> for some reason my code is showing this.</p>

<pre><code>&lt;div class="tablenotes"&gt;

&lt;p&gt;&lt;span class="tariffnote"&gt;Weekly price in Euros.&lt;/span&gt; £ in brackets are approximate sterling equivalent based on &lt;strong&gt;£1 = 
  1.2&lt;noscript&gt;1.1986&lt;/noscript&gt;€1.2&lt;/strong&gt;    &lt;/p&gt;


&lt;/div&gt;
</code></pre>

<p>It is rounding the <code>exchRate</code> as it should but it is placing it in twice</p>

<p>Anyone got any ideas?</p>

<p>Thanks</p>

<p>Jamie</p>
