Demo of Autocomplete in JQuery UI

Change this to




Change the disabled status to see the effect on autocomplete .

source: [ "PHP", "JQuery", "JavaScript", "HTML", "ASP", "Perl", "MySQL","Access","Excel","Dot Net" ],



HTML

<input id=auto_c>
<div id=d1></div>
Change this to 
<div class='radio-inline'>
  <label><input type='radio' name='r1' id='r1' value='true' checked>True</label>
</div>
<div class='radio-inline'>
  <label><input type='radio' name='r1' id='r2' value='false' >False</label>
</div>

jquery

<script>
$(document).ready(function() {
////////////////
$( "#auto_c" ).autocomplete({
  source: [ "PHP", "JQuery", "JavaScript", "HTML", "ASP", "Perl", "MySQL","Access","Excel","Dot Net" ],
  disabled: true
});
///////////////
var status_used = $( "#auto_c" ).autocomplete( "option", "disabled" );
$('#d1').html( " <b>Status of disabled   :  </b>: " + status_used );
//////////
$("input:radio[name=r1]").click(function() {

var sel = ($(this).val() == 'true');
$( "#auto_c" ).autocomplete( "option", "disabled", sel );
var status_used = $( "#auto_c" ).autocomplete( "option", "disabled" );
$('#d1').html( " <b>Status of disabled   :  </b>: " + status_used );
})
///////////////////////
})
</script>