ile devre dışı bırak select_tag Nasıl javascript ile bu örnekteki gibi bir select_tag
devre dışı bırakabilirsiniz:Raylar javascript
<button onclick="DisableFields()">Disable</button>
<p class="col-lg-2" id ="test1" >
<%=
select_tag(:customer_service_beneficiary_id, options_for_select(customer_service_beneficiary_col) , :class => "form-control")
%>
</p>
Bunu deneyin ama bir işe doesnt:
function DisableFields() {
console.log('Disable');
$("test1").prop('disabled', true);
$("test2").attr('disabled','disabled');
}
bu kullanıcıyı ekle: disabled => true – uzaif
herhangi bir konsol hatası? – uzaif
seçiminiz yanlış test1, – uzaif