Call this code from within whatever Action(s) is/are going to be sending AJAX responses:
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender(TRUE);
This disables the Layout engine for that action, and it turns off automatic view rendering for that action. You can then just "echo" whatever you want your AJAX output to be, without worrying about the normal view/layout stuff getting sent along for the ride.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…