Javascript is not called on radiobutton list index change
<p>I have written code for javascript but it is not called any how. I tried to call both form html side and also by assigning attribute from page load event but it is not at all called.</p>

<p>This is the code for my javascript.</p>

<pre><code>function rdbantiplatelet_onClick(thiscontrol, trName) {
    alert('hi');
    var RB1 = thiscontrol;
    var radio = RB1.getElementsByTagName("input");
    var trDose = document.getElementById(trName.toString());
//  var RB1 = document.getElementById("&lt;%=this.rdbantiplatelet.ClientID%&gt;");
//  var radio = RB1.getElementsByTagName("input");
//  var tblAntiplatelet = document.getElementById("&lt;%=tblAntiplatelet.ClientID %&gt;");

    for (var i = 0; i &lt; radio.length; i++){
        if (radio[i].checked){
            trDose.style.display = "";
            return true;
        }
        else{
            trDose.style.display = "none";
            return true;
        }
    }
    return false;
    }
</code></pre>

<p>This is the code to call javascript written in page_load event..</p>

<pre><code>rdbantiplatelet.Attributes.Add("OnClick", "return rdbantiplatelet_onClick(this,'" +  trDose.ClientID.ToString() + "');");
</code></pre>
