Hello People, I am a solve this problem i get a code javascript that run after load library, is a kind of $Jquery.ready(), but without Jquery Look
public function GetEndScript() {
QApplication::ExecuteJavaScript("
function ready(func) {
var span = document.createElement('span');
var ms = 0;
setTimeout(function() {
try {
document.body.appendChild(span);
document.body.removeChild(span);
func();
} catch(e) {
setTimeout(arguments.callee, ms);
}
}, ms);
}
ready( function(){ $('#".$this->ControlId."').markItUp(mySettings); } );
");
return parent::GetEndScript();
}
But appeared other problem, my QCustom Control call a library Jquery and a plugin Jquery so the order that include each one them is very important, Jquery always load before that JqueryPlugin else happen error javascript.
The question is when QCustomCOntrol Render into a QForm the order that librarys load is one, and when QCustomControl Render from the event Ajax the order librarys load is other, more exaclty is reverse.
my solution is into class QFORMBASE line 370 i chage for this
$strJavaScriptToAddArray = array_merge($strJavaScriptToAddArray, array_reverse ($strScriptArray));
put array reverse, but i think that this change could come in the package already Qcodo.