Hi Mike, i wanted to avoid that any control would be used in the form while is processing something so i create a QWaitPanel which extends QDialogBox and this is shown in any ajax call (it shows a message with a wait image similar to the image used by QWaitIcon), the problem was that the javascript code which shows and hide the control dont do that in controls wich extends qdialogbox.
this is the code of the QWaitPanel:
<?php
class QWaitPanel extends QDialogBox {
protected $blnMatteClickable = false;
public function __construct($objParentObject, $strControlId = null) {
//LLAMADA A CONSTRUCTOR DEL PADRE
parent::__construct($objParentObject, $strControlId);
//DATOS DEL DIALOG BOX
$this->strText = '<div class="waitcontrol">Wait a momment please...<br /><br /></div>';
$this->blnDisplay = false;
$this->strFontSize = '16px';
$this->strHeight = "80px";
$this->strPadding = "20px";
}
}
?>
and this is the way how i use it (i create a form base for all my other forms like qcodo site):
<?php
class GeneralForm extends QForm {
protected $strPageTitle;
protected $intModulo;
protected function Form_Create() {
QApplication::Authenticate();
if(!empty($this->intModulo))
if(!Session::TieneAccesoProceso($this->intModulo)) die("NO TIENE ACCESO A ESTE MODULO");
//Wait Panel
$this->objDefaultWaitIcon = new QWaitPanel($this);
//Wait Icon
//$this->objDefaultWaitIcon = new QWaitIcon($this);
}
}
?>
then i extend the base form like this:
<?php
require_once '../includes/prepend.inc.php';
class IngresoArticulo extends GeneralForm{
protected function Form_Create() {
parent::Form_Create();
...
}
....
}
?>
and in my template:
<?php
require_once __INCLUDES__."/header.inc.php";
$this->RenderBegin();
//my own controls with custom html...
$this->objDefaultWaitIcon->Render();
$this->RenderEnd();
require_once __INCLUDES__."/footer.inc.php";
?>
.bc