hi i was wondering if the zend framework provides a built-in way of
manipulating html from the controller/action using ajax and javascript. i'm
referring to how xajax and sajax does this. you see they implement something
like the following on the php script:
$x = new xajax();
$x->setStyle('aClass', 'display:none');
to manipulate the html and set the style of elements with class aClass to
'display:none'
<div class="aClass">some content</div>
now, moving on the mvc approach. i was thinking of a similar way to handle
an ajax request to '/ajax/save/'. the said action will save some data passed
by the ajax request and return a notification on the success of the
operation. it will do so by creating a new div on the html an displaying the
message in it. following is an imaginary code of the said idea.
class AjaxControler extends Zend_Controller_Action {
public function saveAction() {
$data = getParam('data');
// save $data probably to database
$x = new xajax();
$x->addDiv('Data successfully saved', 'position:centered');
}
}
now, as you see. i'm not defining any view scripts. and i hope your getting
my point. any nice ideas about this. am i doing this right?
--
View this message in context:
http://www.nabble.com/doing-xajax-like-operation-in-zend-framework-tp23318792p23318792.html
Sent from the Zend Framework mailing list archive at Nabble.com.