0
I want to load a script tag only when the other one is FULLY loaded.
Example:
<script type="text/javascript" src="js/scriptUm.js"></script>
<script type="text/javascript" src="js/scriptDois.js"></script>
I want scriptDois to load only after scriptum has loaded COMPLETELY.
I have tried some ways but all were related to page loading, I would like a way that is related to loading another script.
The way you put it, they’re already loaded in sequence.
– bfavaretto
Maybe this question will help you https://answall.com/questions/138892/%C3%89-poss%C3%Advel-include-one-file-javascript-in-another-file-javascript
– Sumback
@bfavaretto Correct me if I’m wrong, they are actually executed in sequence, however the scriptDois does not run independently of the scriptum having finished its execution completely.
– Levi
The second executes when it finishes the execution of the first. Unless you are firing asynchronous operations (timers, ajax) and want to load the second at the end of these operations. In this case the load will depend on what the code of the first script is like. Maybe this helps you: https://answall.com/q/14544
– bfavaretto