$modx->controller->addHTM
$modx->controller->addLastJavascript('/assets/template/j/myScript.js');
window.onload = function() {
jQuery(function($) {
$('.x-form-text').addClass('test');
});
}
This question has been answered by jonleverrier. See the first response.
Would be interested to hear if there's a different solution using ExtJS.$modx->controller->addLastJavascript('/assets/template/j/myScript.js');$modx->regClientStartupScript('/assets/template/j/myScript.js');Ext.onReady = function() {
Ext.select('.x-form-text').addCls("test");
}