[Javascript] compare this two scripts and tell me what is wrong

Lester lester at denhaag.org
Sat Jan 11 09:55:27 CST 2003


Recently I ran into the same phenomenon. The two functions are identical except 
for the alert box. In my case, when the alert box was closed, the function 
worked as expected. This lead me to believe that it had something to do with 
giving the iFrame time to load its document. But alas, a setTimeout for the load 
did not solve anything.

The solution I found is having the transfer take place from an onload handler in 
the document that is loaded in the iFrame, i.e.

     onload="parent.document.all['divka'].innerHTML = document.body.innerHTML"

Hope this helps/clarifies.

l8R lES
-- 
When all the media we consume are digitized, the company that controls the media
formats and the players to decode those formats will have enormous influence
over the culture at large.                                             Salon.com
http://open.denhaag.nu                                    http://www.denhaag.org




More information about the Javascript mailing list