Thanks for helping out, I appreciate it. Sorry it's taken a while for me to reply.
Code:
document.getElementById("myli").innerHTML = "3rd party output"
Did you mean for the code above to be a replacement for document.write in the 3rdparty.js file in first post example? If so, then I can't do that, as I can't modify the 3rdparty.js file.
It seems like there might not be a solution, unless I've mis-understood...
The timeout didn't seem to help, even when substituting the script tag for some plain text. I'm thinking that is due to the use of the deprecated document.write?
I'm therefore back to square 1 (almost). You mentioned using DOM functions earlier instead of document.write. Is there a wrapper function that can replace it, so that I could write each one of the blocks to the DOM, one by one?
Do you mean re-writing the 3rd party file itself to use DOM statements? If so, that won't be possible in all cases unfortunately (it may not always be the same javascript file).
If the html in the "myjs.js" file were to be split up so that each section was placed in a different function, and then each function executed once the other had fully loaded, would that overcome the sequencing...
Leave a comment: