I have a javascript function that is using setTimeout
. My problem is that I have an ASP.NET page that has code that is getting executed on page load before the function is complete. Is there a way to either pause the page load or call the page load only after the timer is finished. The setTimeout file is in a seperate JS file and not part of asp.net page.
setTimeout(function () { myFunc(); }, 1000);
I know in MVC you don't have to deal with this.