Answer the question
In order to leave comments, you need to log in
How to correctly show in a pop-up window a component received by an AJAX request in modern Bitrix?
Forced to ask a question to the world community, because. Bitrix support did not want to help, referring to the particularity of the solution (2363153 How in a modern BUS to correctly show a component received by an AJAX request in a pop-up window?).
We have a heavy component 2.0 at the input (the others are not used now). Also available fresh main and ui. You need to request its issuance and show it in a pop-up window. And better (since we are talking about Bitrix) by means of BX .
A typical way (very ancient) is to use the component in AJAX mode. Unfortunately, I could not quickly find documentation on the issue. There is an ancient file (it was still written then). But don't include it here.
It does not fit here at all (not for this, it is for subsequent interaction and updating only part of the page).
Well, solutions from the developers:
Answer the question
In order to leave comments, you need to log in
Solved based on \CMain::ShowAjaxHead. Of course, there is no documentation for it. Found in source.
It solves the task of displaying scripts and styles of the called component.
I dashed off my AJAX script that calls any component. Difference from the new Bitrix idea (AJAX controllers) in HTML, not JSON response.
I also made my own loadable JS library (used BX.ajax.promise and BX.ajax.submitAjax).
Of the novelties there are AJAX controllers. But this idea is closer to REST, because aims to exchange JSON.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question