134
Views
6
Comments
Solved
include code in body section
Application Type
Reactive
Platform Version
11.19.0 (Build 38072)

Hello all

I'm currently trying to use aJavaScript library in my OutSystems Reactie Web project and those external JavaScript code MUST be added to the end of <body> tag in html.


The code is like

var myMap = new Maps.Map({    

container: "myMap",    

center: new Maps.LngLat(-96, 35),    zoom: 3 

 }); 

myMap.on('load', function() {  

//customize your map once loaded 

});

 </script> 


I found a forum entry that shows how to achieve this in a web applicaiton but not for reactive. Has anybody an example how to achiev this in a reactive web application?

Best regards
Dimitri

2020-09-21 11-35-56
Sachin Waghmare

Hello Dimitri,

Please try the solution as suggested into the below post.

https://www.outsystems.com/forums/discussion/51616/how-to-insert-external-javascript-code-into-body-section-of-html/

Thanks,

Sachin

2021-09-08 12-52-36
Dimitri Miller

Hello Sachin


Thank you for your answer. As mentioned in my question this thread is for traditional web apps, not reactive web apps.


Best regards
Dimitri

2021-09-08 12-52-36
Dimitri Miller

Thank you Sachin


The second link is quite helpful.


Best regards

Dimitri

2023-03-16 16-29-51
Paulo Rosário

Hello Dimitri, 

You can try this code snippet to add a script tag to the end of the body: 

// Create the elementvar 

script = document.createElement("script");

// Add script

 contentscript.innerHTML =".."

// Append

document.body.appendChild(script);

I hope it helps! 

Paulo Rosário

 

2023-06-15 18-30-12
FRANK JOHNNY GANGUILHET

Thanks for the post and the solution!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.