Using ajax to process textfield in Drupal 7
change it to and then try again.

$form['license'] = array(
  -
  -
  '#ajax' =&gt; array(
    'callback' =&gt; 'license_fillin_js',
    'event' =&gt; 'change',
    .
    .
    .

  ),


As an example you can check this link