48
Views
3
Comments
i want to add script after head tag


i want to add this scripts after head tag 


2026-02-26 06-29-24
Rahul
 
MVP

Hi @Abduerhman Salama ,

You can try this way to add script tag after head.

var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'url';    
document.head.appendChild(script);


Use this part js on the screen event onrender.


Hope this will help you,


2023-02-19 05-11-08
Faais

Hi Rahul,
That's right, but I recommend adding this JavaScript in the OnReady event instead of OnRender because OnReady event ensures that the entire page, including external resources, has loaded before executing the script, making it safer to manipulate DOM elements. 

2024-12-02 13-16-47
Vipin Yadav

Hi @Abduerhman Salama,

I have included the link to a post below which should help you resolve your issue. 

https://www.outsystems.com/forums/discussion/96401/add-html-in-head-tags-odc-application/

Thanks,

Vipin Yadav

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