I have a with a number of
s. Each has a unique value. I need to disable an
with a given de
I would like to give you also the idea to disable an with a given defined value (
not innerhtml
). I recommend to it with jQuery
to get the simplest way. See my sample below.
HTML
Status:
Javascript
The idea here is how to disable Printed
option when current Status
is Hand
var status = $('#option').find('.status');//to get current the selected value
var op = status.find('option');//to get the elements for disable attribute
(status.val() == 'hand')? op[2].disabled = true: op[2].disabled = false;
You may see how it works here:
https://jsfiddle.net/chetabahana/f7ejxhnk/28/