Talk:CSS Independent Content

From GreaseSpot Wiki
Revision as of 14:10, 5 June 2007 by 90.184.26.191 (talk) (How about this instead?)
Jump to navigationJump to search

This might be more suitable in Code snippets?

I agree. --Henrik 05:47, 5 June 2007 (EDT)

sometimes its blank

Hi, I have a problem with this. It could be that I do something wrong. However: about 1 out of 5 times the content stays blank. I tried to change the timeout to 1000. I tested it 20 times, and it worked all the time.

Isn't there a "domIsNowCreatedAndYouCanGoAhead" event that we can listen to instead of using setTimeout?

How about this instead?

function $(id) {return document.getElementById(id)};

var iframe = document.createElement("iframe"); iframe.setAttribute("id", "settings"); iframe.setAttribute("style", "display:block;z-index:1002;position:fixed;overflow:auto;left:30px;top:30px;right:30px;bottom:30px;background-color:white;padding:15px;border:1px solid black"); iframe.addEventListener('load', showSettings2, false);

function showSettings2() {

   $('LIU_settings').contentDocument.body.innerHTML = '<html><body>test</body></html>';

}