views:

16

answers:

0

I am coding a PHP MVC and I usually to have use AJAX. This MVC is XML based that is rendered with a XSLT stylesheet.

In my case I have a controller named AjaxController that controls all the AJAX petitions, here an example:

public function getMembersAction()
{
    $group= $this->getPost("group");

    $this->view->members = Members::get($group);

    $this->view->Template("getmembers")->Render();
}

This will finally outputs a HTML code. I most cases I use this to populate <select /> and other things, not only to retrieve a string.

I want to know what are the other ways I can use dataType in jQuery.ajax(); to render, for example, a <select /> or if I had to render a list of comments that will need some HTML: <div />, <b />, etc. I suppose that this can be done with jQuery, but it's practically recommended?

Thank you in advance!