So, I'm building a site for work, and I have a form with a submit button. The input fields of the form correspond to fields in the database, and I'd like for the button to make an AJAX request using jQuery to save the data, then do nothing. However it goes ahead and renders a blank page with whatever I echo...
Here is relevant code:
Code:
In IndexController:
public function init() { //other stuff $ajaxContext = $this->_helper->getHelper('AjaxContext'); $ajaxContext->addActionContext('save', 'html') ->initContext(); }
public function saveAction() { //Shouldn't need to do this? $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(true);