Hello :),
I’m trying to understand and make this thing to work here. No success so far.
class EquipasController extends OccControllerAction{
protected $_flashMessenger = null;
public function init(){
$this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');
$this->view->action = $this->_request->getActionName();
$this->view->controller = $this->_request->getControllerName();
if ($this->getRequest()->isXMLHttpRequest()) {
$this->_helper->layout->disableLayout();
}
}
public function listaAction() {
echo ("I'm HERE??");
}
}
I have this on my default defined view for Equipas controller:
<a href="<?php echo $this->url(array("controller"=>"equipas","action"=>"lista"), null, true); ?>" class="ajaxloader">Mostra Lista Sff</a>
<div id="testresults">
<h1>I would love that something appears here when I click...</h1>
</div>
And below on that same view, the corresponding javascript:
$(function() {
$('.ajaxloader').click(function(event) {
var target = $(this).attr('href');
window.location.hash = target;
$.ajax({
url: target,
success: function(data) {
$('#testresults').html(data);
}
});
return false;
});
});
When I click the link, I get the all page inside #testresults , and NO data displayed. (that’s because I believe I’m passing none) BUT, I don’t get the echo of my controller on the viewport neither…
Last 5 hours lost here…
X.X
Márcio