readonly attrib

Cheddabobb

New Member
I'm trying to add a read-only attribute here can you help me with the code in here that if the box is checked my average row will be read-only\[code\]<input type="text" name="average[]" class="average" id="average_<?php echo $row['student_no']; ?>" value="http://stackoverflow.com/questions/15916177/<?php echo$row['average_pts']; ?>" ><input type="checkbox" name="disable[<?php echo $row['student_no']; ?>]" id="disable" value="http://stackoverflow.com/questions/15916177/1" class="disable" <?php if ($row['disable_comp']=='1') { echo "checked=\"checked\""; } ?>>$(".disable").change(function() { var val = $(this).val(); if ($(this).is(':checked')) { var checked = $('input[type=checkbox]').is(':checked'); $("input").unbind('keyup', computeValues); var checked=$("#able").is(':checked'); //attr }else{ $("input").bind('keyup', computeValues).trigger('keyup'); }});\[/code\]
 
Top