Slow iframe rendering - firefox

R

reflex

Hi,

i am using onmouse tooltip on my website. Under them i use iframe to
hide form elements if is tooltip above them. Everything works fine
only at firefox there is +-1sec "refresh" when tooltip function is
called and iframe is appended to the document.

CODE:
//create iframe element
var ifr = document.createElement('iframe');
// i try this to avoid "refreshing"
ifr.src = 'javascript:null';
ifr.style.position = "absolute";
ifr.style.border = 0;
ifr.border = 0;
ifr.id = lbl+'_ifr';
// position it under tooltip div
ifr.style.top = o.style.top;
ifr.style.left = o.style.left;
ifr.style.width = o.offsetWidth;
ifr.style.height = o.offsetHeight;
//append to the body
document.body.appendChild(ifr);

When i comment append method, function works fast in FF. I know that
FF is very slow with javascript but this is more then i expected.

Thx for help
 
S

Steve

Reflex,

Don't worry at all, the iframe is not needed for Firefox PERIOD.

The iframe is only required for IE6 and below, and is the classic hack
to block out select elements that don't obey they z-ordering.

only load the iframe for IE6 and below (this was fixed in IE7)...
since it will unnecessarily create a brand new window object that
isn't needed at all.

Cheers
Steve
 
M

marss

reflex said:
Hi,

i am using onmouse tooltip on my website. Under them i use iframe to
hide form elements if is tooltip above them. Everything works fine
only at firefox there is +-1sec "refresh" when tooltip function is
called and iframe is appended to the document.
Steve is completely right, but if it is hard to modify code or you use
iframe for another purpose then remove
ifr.src = 'javascript:null';
and don't set src property at all.
Regards, Mykola
 
R

reflex

Thx both of you! I dont realize that i dont have to use iframe with
firefox.

iframe for another purpose then remove
ifr.src = 'javascript:null';

I tried this before. It is purposely to avoid iframe "refreshing". I
dont need answer anymore, but i will be happy to know solution how to
avoid this "refreshing".


Cya
reflex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top