QAjaxControlAction
Get ControlId of sub-panel
I have a situation, where I've created a Panel and then created child Panels of that original Panel. Now, I need to add a button to the child Panels, which is easy. However, when the button is pressed, I need to get the ControlId of that child panel. Can someone help me with this?
Here's what I have so far:
//Create the wrapper panel
$this->pnlMasterOps = new masterprocessStepsSortablePanel($this);
//Create child panels
for ($i, $i < 10; $i++) {
$this->pnlOps[$i] = new QPanel($this->pnlMasterOps);
$this->pnlOps[$i]->AutoRenderChildren = true;
$this->btnAddDel[$i] = new QButton($this->pnlOps[$i]);
$this->btnAddDel[$i]->Text = QApplication::Translate('Add/Delete');
$this->btnAddDel[$i]->AddAction(new QClickEvent(), new QAjaxControlAction($this->pnlMasterOps, 'EditStep'));
}How do I get access to the ControlId of "btnAddDel" in "EditStep"?
Thanks,
LaCeja
AJAX Timeout Handler for QAjax Actions
Hello, Please can someone tell me how to implement an ajax timeout handler for QAjax Actions?
What I mean is this, sometimes, while executing a QAjax actions, the network goes off and the wait icon continues spinning forever, I want to be able to alert my users that the request timed out or something.
Please, I appreciate your help. Thank You.
Ajax Problems - two things to try
I've had some problems getting ajax to work here's two helpfull things to try if your QAjaxAction/QAjaxControlAction is not working as you expect
1) http://www.qcodo.com/forums/topic.php/2358/1/
the $this->RenderBegin() and $this->RenderEnd() must be not trapped inside an element on the page, like a table
HomePage
<?php
$this->RenderBegin();
?>
<?php
$this->pnlLeft->Render();
?><?php
$this->pnlRight->Render();
?>