How to make sure an iFrame is referenced before pasting html into it (ping Martin Honen)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


The god that is Martin Honnen gave me a great tip to DOM/JS some HTML data
into an iframe, but I need to make sure that the iframe is ready to take it
before I paste it in.

At the moment, if I don't specifically click into the iFrame (it is in
design mode) then when I paste the HTML it attaches itself to the main
document rather than in the iframe 'body'.

My JS function at the moment is simply:

 function doTable(tabledata)
  if(tabledata != '')

but I think I need an extra line above the iHTMLEditor (my iframe's ID) bit
to make sure it goes in there.

Any ideas?



Site Timeline