[SalesForce] Radio Button onClick event not getting true

I have a radio button it's function is, when click it should reRender pageblock table. But when I press it button not get clicked. so that my table not get reRender. For achieving that i tried but not working. Please help me.

<apex:pageBlockTable id="cWapID" value="{!con_ord}" var="cWap" rendered="{!con_ord.size > 0}"> 
<apex:column headerValue="Select" styleClass="actionColumn">
    <apex:actionSupport event="onclick" action="{!onChangeContract}" reRender="cWapID, attachmentSection" status="waitMsg">
        <input type="radio" name="chosen" id="{!cWap.Id}" VALUE="{!cWap.Id}" onclick="setcontractId(this,'{!$Component.RadioButtonValue}');"/> 
    </apex:actionSupport>
 </apex:column> 
</apex:pageBlockTable>
 <apex:inputHidden value="{!selectedcontractId}" id="RadioButtonValue"/>   

  <script type="text/javascript">
      function setcontractId(input, textid) {
          document.getElementById(textid).value = input.value;
      }   
   </script> 

My Controller method:

public String selectedcontractId {get; set;} 
//On click of radio button change 
public PageReference onChangeContract(){  
    return null;
}

On Click radio button here i am getting selectedcontractId value as an Id.

Best Answer

All other things working correctly, your use of action support is incorrect. It needs to be the child of the mage it is supporting not the parent since you already have an onClick on the input you can remove the action support altogether

<apex:inputRadio name="chosen" id="{!cWap.Id}" VALUE="{!cWap.Id}"  
                 onclick="setcontractId(this,'{!$Component.RadioButtonValue}');"/> 

Also, javascript is CASE SENSITIVE so your function never gets called so change the onclick to this:

onclick="setcontractid(this,'{!$Component.RadioButtonValue}');"

To call the controller method, use action function and param

<apex:actionFunction name="setcontractid" action="{!onChangeContract}" rerender="">
   <apex:param value="" name="myparam" assignto="{!controllervariable}"/>
</apex:actionFunction>

and change your onClick to:

onclick="setcontractid(this.value);"