$.ajax({
url: '/ajax/test.php',
type: 'post',
data: {},
}).done(function(data) {
});<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");?>
<?$APPLICATION->IncludeComponent("test:test", "", [], false, []);?>
//ajax.php
define("STATISTIC_SKIP_ACTIVITY_CHECK", "true");
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php");
$APPLICATION->ShowAjaxHead(); // в ajax запросе подтянутся стили и js подключаемого ниже компонента
$APPLICATION->IncludeComponent(
...
);BX.ajax({
method: 'POST',
url: 'path_to_php/ajax.php',
data: data,
dataType: 'html',
onsuccess: function (data) {
// что-то можем сделать при успешном ajax запросе
}
});