S

Ajax loaded template and formrows rendering

  • Thread starter Thread starter Scandal
  • Start date Start date
S

Scandal

Guest

Hello all! (y)

I have a question about ajax loaded content (template).

I use this code to get some ajax loaded content:
JavaScript:
Code:
    var ajaxParams = {'act': 'test'};
    XF.ajax('post', "{{ link_type('admin', 'canonical:myroute', null) }}", ajaxParams, function(data, textStatus, jqXHR){
        $('#mydiv').append(data.output);
    });
The php side has this:
PHP:
Code:
$this->setResponseType('json');
$html = \XF::app()->templater->renderTemplate('admin:sc_mytemplate', []);    
$output = ['output' =>...

Read more

Continue reading...
 
Similar threads Most view View more
Back
Top Bottom