Forum Moderators: open

Message Too Old, No Replies

IE <table> artefact when hidding an <iframe>

         

fmaz

7:53 pm on Nov 25, 2004 (gmt 0)

10+ Year Member



First, under FireFox everything is OK,
Second, there is NO reason why it should do that, but I must find a solution...

ok, i've something like this:

<script>
function hidediv() {
document.getElementById("divid").style.visibility = "hidden";
}
</script>

<div id="divid" style="position:absolute;">
<iframe src="a_page_with_table.php"></iframe>
<a href="#" onclick="hidediv()">close</a>
</div>

Ok, So what I do is that I hide the DIV when clicking on the close link.
Everything disapear as it should, except that the tables background stay visible...

If I select the text on the page under the rectangle artefact with my mouse, the artefact disapear...


--------------
How can I remove thoses artefacts?

tedster

11:12 pm on Nov 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This definitely sounds like an IE rendering bug.

You might work around it by using a show/hide function rather than a simple hide function. Then you could switch an apparently empty div (perhaps an image that matches the min background) to "visible" when you hide the displayed table.

By giving IE something else to render, it should eliminate the visible artifacts - at least that's my hope.

fmaz

1:35 am on Nov 26, 2004 (gmt 0)

10+ Year Member



I solved my problem.

When hidding the iframe (or the div, same problem, I've tried both), I ALSO ask the iframe to be resized to 1x1 pixel.

No more rendering trouble...