drupal form api call function I have a select box in my drupal form and i want to call a spesific php function whenever the select option is changed. How can i achieve this?

this is my code so far:

function langSelect_form($form, &amp;$form_state) {
    $form['langSelect'] = array(
       '#type' =&gt; 'select',
       '#options' =&gt; drupal_map_assoc(array(t('English'), t('Norsk'),t('Samisk'))),
    );
    return $form;
} 


thanks!
You can go through AJAX Forms in Drupal 7. It describes how you can use ajax in your form with examples