I\'ve currently got a script that\'ll check for the value of a select box, and then enable a text field right next to it, and then hopefully set focus.
I have this a
Modified of the above answer with cached this jq object. Also the filter inside next is not needed. next() will only ever return the next sibling. The filter is basically saying get me the next only if it is an input or whatever filter you give. If you are sure the next is the desired object there is no need to include the filter.
$("#assessed select").change(function () {
var $this = $(this);
if( $this.val() === 'null') {
$this.next()
.attr("disabled", true);
}
else {
$this.next()
.removeAttr("disabled")
.focus();
}
});