ENXF NET
Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
- Joined
- Nov 13, 2018
- Messages
- 24,662
- Points
- 823
Reputation:
Hello all!
I have a question about ajax loaded content (template).
I use this code to get some ajax loaded content:
JavaScript:
The php side has this:
PHP:
Read more
Continue reading...
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);
});
PHP:
Code:
$this->setResponseType('json');
$html = \XF::app()->templater->renderTemplate('admin:sc_mytemplate', []);
$output = ['output' =>...
Read more
Continue reading...