Open TonyGao opened 7 years ago
Replace #yourTargetElement with the actual ID or selector of the DOM element where you want to append the content.
$('#append').click(function () {
$('#title-body').layout('expand', 'south');
spf.load("{{ path('admin_org_title_new') }}", function(response) {
if (response) {
$('#yourTargetElement').html(response);
} else {
console.error('Failed to load content');
}
});
});
Hi, there
I have a try with SPF 24 (v2.4.0), when I use spf.load api, it's return undefined, but the xhr is work normally and the response is proper for me, code below(use in background template system). The question is how can I get the response content and append it to the specific dom, perhaps like pjax way?