Just use it by adding a template file of your module/yourAction named
yourActionSuccess.js.phpThe content of this file -once rendered by php- has to be javascript.
example:
$(document).observe('dom:loaded', function() {
<?php include_partial('contact/init') ?>
EM = new EuroMineral.contact();
});
As you can see, you have access to php for generating JS...
To include this javascript in your response, use :
<?php use_dynamic_javascript('inscrit_demande/initBatiCodeList'); ?>
in your templates.
It just gives you the power of MVC separation and partials, components rendering in your js files.

