Call a Javascript Function and Update my Form Element at the same time This is my ajax callback function

function myid_search_idnumber($form, $form_state)
{
    return $form['id'];
}


It updates the values in $form['id']. But Because I wanted to call a javascript function as well as update the form, I added a few codes:

function myid_search_idnumber($form, $form_state)
{
    $commands[] = ajax_command_invoke(NULL, 'myid_update_id_number'); 
    $page = array( '#type' =&gt; 'ajax', '#commands' =&gt; $commands, ); 
    ajax_deliver($page); 

    return $form['id'];
}


The three lines of code added above, calls a javascript function.

$.fn.myid_update_id_number = function(){   
    alert('Wew');         
}


Performing those only calls the javascript function but does not update anymore my form. How will I call my javascript and at the same time update my form?
Just to ad to the above answer by Ollie.
To return form['id'] too (same as the default behavior), you can use ajax_command_replace

function myid_search_idnumber($form, $form_state){
    $commands[] = ajax_command_replace(NULL, render($form['id']));
    $commands[] = ajax_command_invoke(NULL, 'myid_update_id_number', array($form['id'])); 
    $page = array( 
         '#type' =&gt; 'ajax', 
         '#commands' =&gt; $commands, 
      ); 
    ajax_deliver($page);
  }