Embed TS in other sites
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.")
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.