Ajax Iframes -> Check if busy?
This is a question regarding开发者_如何学运维 Ajax Iframes.
I have a function to open an Iframe, and set its source, however at some points I would need to open multiple Iframes, and set their sources accordingly. The second iframe should only open if the first one has not finished loading.
Psudocode:
// at some point
x = iframe;
x.src = 'dothiscode.php'
// at some later point
if (x.src = not finished loading)
y = new iframe;
y.src = 'domorecode.php'
else
x.src = 'domorecode.php'
Thank you for your help!
Are you sure there is no other way to do what you have intended except iframes?
This is possible. Set an onload event to trigger a Boolean 'iframe done' then loop through those booleans and check which iframes are finished, or open.
精彩评论