# Other Languages > jQuery >  [RESOLVED] determining RadioButtonFor

## Bill Crawley

Hi All,

in my markup I Have:


```
<tr>
                        <td>@Html.LabelFor(model => model.CustomerLoanOfVehicleExtension, null, null, null)</td>
                        <td>@Html.CheckBoxFor(model => model.CustomerLoanOfVehicleExtension)</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
                        <td>@Html.RadioButtonFor(model => model.CustomerLoanOfVehicleValue, "CCL", new { @class = "optVehicleExt" })@Html.LabelFor(model => model.ContingentCoverLoadValue, null, null, null)</td>
                        <td>&nbsp;</td>
                        <td>@Html.EditorFor(model => model.ContingentCoverLoadValue)</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>   
                    </tr>
                    <tr>
                        <td>@Html.RadioButtonFor(model => model.CustomerLoanOfVehicleValue, "FCL", new { @class = "optVehicleExt" })@Html.LabelFor(model => model.FullCoverLoadValue, null, null, null)</td>
                        <td>&nbsp;</td>
                        <td>@Html.EditorFor(model => model.FullCoverLoadValue)</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>   
                    </tr>
```

and then in JQuery I have:



```
function customerLoanOfVehicle() {
            if ($("#CustomerLoanOfVehicleExtension").is(":checked")) {
                $(".optVehicleExt").removeAttr("disabled");
            } else {
                $("#CustomerLoanOfVehicleValue").attr("disabled", "disabled");
                $(".optVehicleExt").attr("disabled", "disabled");
            }
     }
```

This sets my optionbuttons enabled/disabled fine based on the checkbox.

My problem is that I cannot seem to get which of the option buttons have been set.

If I do something like:



```
$("#CustomerLoanOfVehicleValue").click(function () {
            var value = $(this).val();
            alert(value); 
        });
```

Only my first value ever gets hit. I.e. I click the option whos value is CCL and the alert says CCL, but when I click the option with FCL I get nothing?????

----------


## Bill Crawley

Doh...Solved it. Here's the answer for anybody else.

On the RadioButtonFor, introduce a new id :



```
@Html.RadioButtonFor(model => model.CustomerLoanOfVehicleValue, "FCL", new { @class = "optVehicleExt", @id = "FCL"})
```

Make the @id unique for each radiobutton then in JQuery as normal you can do:



```
$("#FCL").click(function () {
            ............
        });
```

Works!

----------

