archimede
01-19-2005, 07:15 AM
I write a script wich give the possibility to the user to choose which file will load into the iframe. After that, I transfer the information from the iframe into the HTML page using some DOM script
The problem is that the iframe take few miliseconds to load. I would like to make a stop to give the time to the iframe to load before doing the other operation. If there is not a delay the other operation will not work.
I tryed different way using time and setTimeout but nothing seems to work.
With the setTimeout it works but as we can not control the time of loading. It became very difficult to clear the Timeout.
If some one have an idea, it will help me tank you in advance
This script is the one i use to transfer the url to the iframe
function transfertFichier() {
document.getElementById("recupObjet").src=convertFile("chFile")
abc()
}
This script is one which I would like to do after the iframe have load.
function abc() {
document.body.innerHTML +=frames[0].document.body.innerHTML
}
The problem is that the iframe take few miliseconds to load. I would like to make a stop to give the time to the iframe to load before doing the other operation. If there is not a delay the other operation will not work.
I tryed different way using time and setTimeout but nothing seems to work.
With the setTimeout it works but as we can not control the time of loading. It became very difficult to clear the Timeout.
If some one have an idea, it will help me tank you in advance
This script is the one i use to transfer the url to the iframe
function transfertFichier() {
document.getElementById("recupObjet").src=convertFile("chFile")
abc()
}
This script is one which I would like to do after the iframe have load.
function abc() {
document.body.innerHTML +=frames[0].document.body.innerHTML
}