Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
How to add third party url script and link in the head tag using js?
  1. URL with script and other with stylesheet to be added in head tag using javascript?
  2. How can I add third party script tag in head using javascript and display the code present below after few seconds when page loads completely?

Eg:

<script>
var RequestURL = '';
function onWindowClosed(obj) {
  console.log("callback event : " + JSON.stringify(obj));
  if(obj.event_name === event_name) {
    console.log("successfully returned: " + obj.message);
  } else {
    console.log("unknown-event");
  }
}
var userDetails = JSON.stringify({
  "appId": ",  
  "customerId": "", 
});       
</script>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can append elements like scripts or stylesheets using vanilla JavaScript

var script = document.createElement("script");
script.setAttribute("src", "https://script.example.com/script.js") // Replace with your script link
var head = document.querySelector("head")
head.appendChild(script)

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!