JavaScript not working in explorer
<p>I have the JavaScript below:</p>

<pre><code>function x()
{
    var y=document.forms[0].elements["pm"];
    var z;
    for(var j=0; j &lt; y.length;j++){
        z=y[j];
        if (z.value=="40")
        {
            z.style.display="none";
        }
    }
    document.body.innerHTML=document.body.innerHTML.replace("Payment by &lt;b&gt;Moneybookers&lt;/b&gt; e-wallet&lt;br&gt;","");
    document.body.innerHTML=document.body.innerHTML.replace("Maestro, Visa and other credit/debit cards by &lt;b&gt;Moneybookers&lt;/b&gt;","Pago con Diners Club, Mastercard o Visa");
}
onload=x;
</code></pre>

<p>The purpose of this code is to remove a radio button completely from the form and remove the preceeding text <code>Payment by &lt;b&gt;Moneybookers&lt;/b&gt; e-wallet&lt;br&gt;</code></p>

<p>Also to replace the text Maestro, Visa and other credit/debit cards by <code>&lt;b&gt;Moneybookers&lt;/b&gt;&lt;br&gt;</code> with text <code>Pago con Diners Club, Mastercard o Visa</code></p>

<p>The html on the form is as follows</p>

<pre><code>&lt;input type=hidden name=moneyb_return value="www.amoramelenceria.com"&gt;
&lt;input type=hidden name=paypal_return value="www.amoramelenceria.com"&gt;
&lt;input type=hidden name=paypal_currency value="USD"&gt;
&lt;input type=hidden name=paypal_cs value="0"&gt;
&lt;input type=hidden name=paypal_noform value="0"&gt;
&lt;font face="Georgia" size=3&gt;
    &lt;input type=Radio name=pm value=41 checked&gt;Maestro, Visa and  other credit/debit cards by &lt;b&gt;Moneybookers&lt;/b&gt;&lt;br&gt;
&lt;input type=Radio name=pm value=40 &gt; Payment by &lt;b&gt;Moneybookers&lt;/b&gt; e-wallet&lt;br&gt;
&lt;input type=Radio name=pm value=90 &gt; Pago con PayPal&lt;br&gt;
&lt;input type=Radio name=pm value=23 &gt; Transferencia Bancaria&lt;br&gt;
&lt;input type=Radio name=pm value=28 &gt; Pago contra entrega&lt;br&gt;
&lt;input type=Radio name=pm value=25 &gt; Western Union/Moneygram&lt;br&gt;
</code></pre>

<p>The script carries out all requests sucessfully in Chrome and firefox, however, only carries out the remove radio button request in explorer. Thus the lines of text that need removed and replaced remain unchanged in explorer?</p>

<p>Your help would be greatly appreciated.</p>

<p>Thank you.</p>
