Embed TS in other sites

From TS NoCode wiki
Revision as of 15:09, 21 January 2025 by Tvi (talk | contribs) (Created page with "To embed the output of a public codeunit, on another website, the following code can be used.<syntaxhighlight lang="html"> <div id="tsContent"></div> <script type="text/javascript"> $.ajax({ url: 'https://[SYSTEM-DOMAIN]/[APP-NAME]/mainpublic?command=[CODEUNIT-NAME]]', success: function(data) { $('#tsContent').html($(data).find(".mainContent").html()); }, }); </script> </syntaxhighlight>It requires jQuery to be loaded beforehand.")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

To embed the output of a public codeunit, on another website, the following code can be used.

<div id="tsContent"></div>
<script type="text/javascript">
    $.ajax({
        url: 'https://[SYSTEM-DOMAIN]/[APP-NAME]/mainpublic?command=[CODEUNIT-NAME]]',
        success: function(data) {
            $('#tsContent').html($(data).find(".mainContent").html());
        },
    });
</script>

It requires jQuery to be loaded beforehand.