I have a link on a page that pops up a new window, and sometimes that second window takes a long time to load.
I want to disable the link on the parent window until the child window finishes loading.
I know I can have the child window onload() to alert the parent, but I don’t want to mess with the child, so I have a little javascript that polls the child window to see if it’s got any data, except that it doesn’t work.
I can’t newwindow.document.getelementbyid because I can never be sure there’s going to be any particular element on that page.
I just want to see if there’s a in it somewhere.
I have a link on a page that pops up a new window, and
Share
You could try getting the body tag, and inspecting if it has children. If it does then the page is either loaded or very close. Close enough IMO.
If the child’s URL is not the same domain, you can’t do anything. That would be a XSS vulnerability.