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 regardsDimitri
It's my bad. Please try these ones for reactive web applications.
https://success.outsystems.com/documentation/11/extensibility_and_integration/javascript/extend_your_mobile_and_reactive_apps_using_javascript/?
https://www.outsystems.com/forums/discussion/64416/video-how-to-use-external-javascript-in-a-reactive-web-app-the-react-way/
Thanks,
Sachin
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/
Hello Sachin
Thank you for your answer. As mentioned in my question this thread is for traditional web apps, not reactive web apps.
Thank you Sachin
The second link is quite helpful.
Best regards
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
Thanks for the post and the solution!