Aqui les dejo el codigo del controlador:
Código PHP:
public function getTwitsAction ()
{
$this->_helper->viewRenderer->setNoRender();
$this->_helper->layout()->disableLayout();
if ($this->getRequest()->isXmlHttpRequest()) {
$this->_helper->viewRenderer->setNoRender();
$twits = new Model_DbTable_Tweets();
$strResultado = '-69';
$numID = isset($_POST['last']) ? intval($_POST['last']) : 0;
$numObjeto = isset($_POST['id']) ? intval($_POST['id']) : 0;
$strOp = isset($_POST['op']) ? ($_POST['op']) : '';
$strResultado = $twits->getTwits($numID, $numObjeto, $strOp);
echo $strResultado;
}
}
Código:
El problema lo tengo en esta linea: <?php echo $this->url(array('controller' => 'index', 'action'=>'getTwits')) ?> pero he probado todas las alternativas que fui encontrando por google sin tener exito, siempre el dichoso 404.function getTwits() {
if(boolIdle) {
boolIdle = false;
$.ajax({
url: '<?php echo $this->url(array('controller' => 'index', 'action'=>'getTwits')) ?>',
type: 'post',
data: {last: numLast, op: strOp, id: numObject},
success: function(transport) {
if(transport.responseText != -69) {
var arrResultados = transport.responseText.evalJSON(), numResultados = arrResultados.length, elFather = $('#twitholder'), elBloque, arrTwit, i, boolMore = false;
if(numResultados) {
elBloque = new Element('div').hide();
if(numLast > 0) {
for(i = 4 - 1; i >= 0; i--) {
arrTwit = arrResultados[i];
if(i === numResultados - 1) {
numLast = arrTwit.ID;
}
addTwit(elBloque, arrTwit);
}
} else {
$('#spinner').remove();
for(i = 0; i < 4; i++) {
arrTwit = arrResultados[i];
if(i === 0) {
numLast = arrTwit.ID;
}
addTwit(elBloque, arrTwit);
}
numFirst = arrTwit.ID;
boolMore = true;
}
elFather.insertBefore(elBloque, elFather.firstChild);
Effect.BlindDown(elBloque, {duration: 0.7, afterFinish: function() {
if(numResultados == 4) {
addMore()
}
}
});
}
boolIdle = true;
} else {
alert('Ha ocurrido un error al leer los mensajes.');
}
}
}
);
}
}
Muchas gracias por cualquier ayuda!


