Well i didn't mention the fact that the issue that i was having is the
ExecuteJavascript(alertPanel(\'alert Message\');)
was not executed on the first load of a panel after an Ajax action.
Here's the initial situation
I have a form that display a menu in a div. In another div, i load a QPanel depending on the menu item selected.
My menu use a QLinkButton but also tried using a QButton.
On the first load of the page, the Qpanel is empty. In fact i render a “dummy” QPanel like
$this->pnlMain = new QPanel($this);
$this->pnlMain->AutoRenderChildren = true;
I've tried putting a dummy text like “click on the menu”.
When the user click a menu item, i do a QAjaxAction:
$this->pnlMain->RemoveChildControls(true);
$currpanel = new my_panel($this->pnlMain);
QApplication::ExecuteJavaScript('alert(\'my_panel\')');
As guessed, the javascript IS NOT executed, BUT if i click again the same menu item, the script IS executed.
After a couple hours of research i came to realise that the problem occured only of the my_panel include a listbox (in the my_panel.class.php not necessarly in the template file).
After examining the response and the eval() of the command, i realized that loadJavaScriptFile was executed with 2 parmaeters.
I also posted a similar POST on the QCubed website forum. I hope MikeHo will be back soon and that little war QCubed and QCodo will be over otherwise i'll just find another framework and invite people to do the same.
Where in the world is MikeHo??!!!
:-)