Currently, my onload event is functioning correctly. However, I am encountering an issue where the second part of the onload event calls another function before the first part is finished.
The initial part inserts information into an input field, while the second part executes a function using that information from the input field.
My dilemma lies in the fact that although both functions are working fine, the first part doesn't have enough time to input the information into the field and only does so after the fact.
Once the page is live, the first part will be dynamic and retrieve information from the URL.
onload = function(){
var tempURLtest = "http://ahoymearty.co.uk/shipyard/eNqrVipPTSzIzytWsoo2tjQ10TE0MzGFEMYGQEAMGaujlFiUm18EMsMUyLfQAZGWOuhsqAhQeXFBanJmYg5Ig6GZubGOsYW5uY6xmYWZjrG5MdBmSyOQQ8AmF2dngh0HZGaU5uR4uihZmRiZG+oopVYUpBaVOJVm5qQoWaUBDUutBQB8sDOU"
var fromURL = tempURLtest.split("/")[4];
//var fromURL = window.location.href.split("/")[4]
document.getElementById("KixCode").value = fromURL
$scope.LoadKixCode()
}