Check a radio button with a specific value

302 views Asked by At

I have this html :

<div class="c_row caption single" style="height: 89px;">
<label>
    <span>Question</span>
</label>
<div class="c_box radio-block" style="height: 88px;">
    <label style="width: 10%; font-size: initial; height: 88px;" class="radio">
    <input class="radio-button" type="radio" name="question_27" value="1" checked="">
    <span class="lb">1</span><i class="input-helper"></i></label><label style="width: 10%; font-size: initial; height: 88px;" class="radio">
    <input class="radio-button" type="radio" name="question_27" value="2">
    <span class="lb">2</span><i class="input-helper"></i></label><label style="width: 10%; font-size: initial; height: 88px;" class="radio">
    <input class="radio-button" type="radio" name="question_27" value="3">
    <span class="lb">3</span><i class="input-helper"></i></label><label style="width: 10%; font-size: initial; height: 88px;" class="radio">
    <input class="radio-button" type="radio" name="question_27" value="4">
    <span class="lb">4</span><i class="input-helper"></i></label><label style="width: 10%; font-size: initial; height: 88px;" class="radio">
    <input class="radio-button" type="radio" name="question_27" value="5">
    <span class="lb">5</span><i class="input-helper"></i></label><label style="width: 10%; font-size: initial; height: 88px;" class="radio">
    <input class="radio-button" type="radio" name="question_27" value="6">
    <span class="lb">6</span><i class="input-helper"></i></label><label style="width: 10%; font-size: initial; height: 88px;" class="radio">
    <input class="radio-button" type="radio" name="question_27" value="7">
    <span class="lb">7</span><i class="input-helper"></i></label><label style="width: 10%; font-size: initial; height: 88px;" class="radio">
    <input class="radio-button" type="radio" name="question_27" value="8">
    <span class="lb">8</span><i class="input-helper"></i></label><label style="width: 10%; font-size: initial; height: 88px;" class="radio">
    <input class="radio-button" type="radio" name="question_27" value="9">
    <span class="lb">9</span><i class="input-helper"></i></label><label style="width: 10%; font-size: initial; height: 88px;" class="radio">
    <input class="radio-button" type="radio" name="question_27" value="10">
    <span class="lb">10</span><i class="input-helper"></i></label>
</div>
<div class="c_box select-block hidden" style="height: 88px;">
        <select class="selectmenu" name="question_27" id="ui-id-2" style="display: none;">
            <option disabled="" selected="" value=""> -- </option>
            <option value="1" selected="">1</option>
            <option value="2">2</option>
            <option value="3">3</option><option value="4">4</option>
            <option value="5">5</option><option value="6">6</option>
            <option value="7">7</option><option value="8">8</option>
            <option value="9">9</option><option value="10">10</option>
        </select>   
</div>


And I want to check the radio button but the problem is that works only for first value of radio. For example if I write :

And I select "1" from "question_27"

Works fine, but If I tried the second value :

And I select "2" from "question_27"

Doesn't work. I get the error that this value doesn't exist.

Can you help me please ? Thx in advance and sorry for my english

0

There are 0 answers