How to trigger Ajax forms machinery
There is a really simple work around for this.
You can add a button or a hidden input field with an ajax callback and trigger this callback by jQuery.

So declare your button:

$form['my_button'] = array(
   '#type' =&gt; 'button',
   '#ajax' =&gt; array(
     'callback' =&gt; 'my_callback',
     'event' =&gt; 'hs_changed',
   ),
   // hide the button and set a unique id:
   '#prefix' =&gt; "&lt;div style='display:none' id='my_ajax_button'&gt;",
   '#suffix' =&gt; "&lt;/div&gt;"
);


In your javascript you can then easily trigger the event with jQuery.trigger:

jQuery("#my_ajax_button input").trigger('hs_changed');


This will trigger your ajax callback.

http://api.jquery.com/trigger/

http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#ajax