Hello Tony,
I mean that's it
Thank you very much
Regards
sys_sby
I mean that's it
Thank you very much
Regards
sys_sby
.numeric p.tip {
font-size: 125%;
}
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
moveRowLabels({self.qid});
function moveRowLabels(qID) {
var alertMsg = 'One or more mandatory questions have not been answered. You cannot proceed until these have been completed.';
// Add some classes
$('#question'+qID).addClass('moveRowLabelsQ');
$('#question'+qID+' table.question tbody td').not('.dual_scale_separator').addClass('answer-item radio-item');
// Hide the first column
$('#question'+qID+' th.header_answer_text, #question'+qID+' th.answertext').hide();
// Uncheck and hide the "No Answer" columns
$('#question'+qID+' .header_no_answer').hide().prev().hide('header_separator');
$('#question'+qID+' input.radio[value=""]').attr('checked', false).closest('td').hide().prev().hide('header_separator');
// Insert the subquestion text into the scale separators
$('#question'+qID+' table.question tbody').each(function(i){
$('.dual_scale_separator:eq(0)', this).text($('.answertext', this).text());
});
// Reset the column widths
$('#question'+qID+' col').css({ 'width':'auto' });
// Only one radio clicked allowed per row
$('#question'+qID+' table.question input.radio').click(function() {
var parentRow = $(this).closest('tr');
$('.active', parentRow).removeClass('active');
$(this).addClass('active');
$('input.radio', parentRow).not('.active').attr('checked', false);
});
$('#question'+qID+' table.question td.radio-item').click(function(event) {
var parentRow = $(this).closest('tr');
$('.active', parentRow).removeClass('active');
$('input.radio', this).addClass('active');
$('input.radio', parentRow).not('.active').attr('checked', false);
});
// At least one radio clicked per row
// Interrupt the submit function
$('#movenextbtn, #movesubmitbtn').click(function(){
var error = 0;
$('#question'+qID+' table.question tbody.error').removeClass('error');
$('#question'+qID+' table.question tbody').each(function(i){
if($('input.radio:checked', this).length == 0) {
error = 1;
$(this).addClass('error');
}
});
if(error == 1) {
alert(alertMsg);
return false;
}
});
}
});
</script>
.moveRowLabelsQ table.question tbody td.answer-item { /* radio cells */
width: 30px;
}
.moveRowLabelsQ table.question td.dual_scale_separator { /* question cell */
width: 80px;
}
.moveRowLabelsQ table.question tbody.error td.answer-item { /* Error cells */
background: pink;
}