Hey folks,
I''m hoping that someone on this group can give me some advice.
I''m currently trying to solve the IE hover issue where if you have a
hover div that appears over a
form element, it pops through. The best solution I''ve found is to shim
in an <iframe> under my hover
for IE browsers and it will block the form element. (I surmise that
most people in this group are familiar with
this fix). I''m trying to use clonePosition to match the location and
size of my hover for my iframe only it''s not working.
It will apply the size to my iframe, but not the location attributes.
I am creating this iframe on the fly with the Element function. Is the
issue that I am creating the iframe incorrectly? Is it my usage of
clonePosition?
I''m using the latest prototype and scriptaculous framework. If anyone
has an idea of what I''m doing wrong that''d be
great, or if there is something out there that someone could point me
to that''d rock too.
Much thanks in advance to anyone with some advice.
-Paul
<code>
function ieShimFix(elmnt){
var body = document.getElementsByTagName("body")[0];
var ieFixframe = new Element(''iframe'',
{id:''ieFixframe'',className:''ieFix'',zIndex:''50''});
$(body).appendChild(ieFixframe);
Element.clonePosition(ieFixframe,elmnt);
$(''ieFixframe'').style.display = "block";
}
</code>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
kangax
2007-Nov-30 22:28 UTC
Re: clonePosition not working with newly created DOM element?
Did you assign absolute position to the iframe? It also makes sense to hide it and set proper src attribute: http://dev.prototype-ui.com/browser/trunk/src/util/iframe_shim.js#L41 http://dev.rubyonrails.org/browser/spinoffs/scriptaculous/src/controls.js#L97 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---