How to get change event working of a taxonomy select box on a node form? I have a taxonomy, which I have added to a content type. Now a select box from the taxonomy appears when I want to create a node of that content type.

That content type have a cck field of type select.

In my module in the hook_form_alter I want to execute the js change event of the taxonomy select box, but it does not work.
And when I try to execute the js change event on cck select box, it works fine.

here is my code.

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
     if($form_id == 'contenttype_node_form') {
        drupal_add_js("
            $('#taxonomy-select-box-id').change(function(){
                alert('change');
           }) ;

", "inline");
    }
This isn't really a Drupal question, but at a guess I'd say the problem is that you're binding the event to an element before the DOM has loaded...so the element doesn't exist yet. You should use one of the standard jQuery methods to run your code when the document is ready, e.g.:

$(document).ready(function() {
  $('#taxonomy-select-box-id').change(function(){
    alert('change');
  });
});