I'm using the following line to add JavaScript code to my module form:
$form['#after_build'][] = 'myModule_after_build'
In myModule_after_build(), I add the Javascript code with calling drupal_add_js('myJavascript','inline').
Unfortunately, it seems that the JavaScript code is added only during the first page call. I would like to pass some arguments to JavaScript, and manipulate the content of the JavaScript, according to the options in the form.
Is there any configuration that I can set to add 'myJavascript' with different arguments to every button click?