I am new on js and I am struggling with this task can someone please give me a little help.. This is my code:
<td><input type="radio" name="nr[1]" value="1" class="col"></td>
<td><input type="radio" name="nr[2]" value="2" class="col"></td>
<td><input type="radio" name="nr[3]" value="3" class="col"></td>
<td><input type="radio" name="nr[4]" value="4" class="col"></td>
Here I got the hidden input that I need to fill with values that come from the js onchange event..
<input type="hidden" name="row_col_nr[5]" value="0" class="row_nr">
And here I have my js code:
var row_col_nr = null;
$(".col").on("change", function () {
row_col_nr = $( this ).val();
alert(row_col_nr); // gives me the value of input that I select
});
My problem is that I do not know how take that row_col_nr values and put to the hidden input I do not know if I am telling right what is my problem.. If someone understands me can you please give me a little help..
minimalminimalclass?