Generic-user-small Paul Ramos 2 posts

Hi Christophe,
First, thanks you so much for writing the prototype/scriptaculous book. I purchased it 2 days ago, and have so far found it
quite invaluable!

I do have a question though that I thought you might be able to help me with.
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. (you are probably very familiar with this technique).
I’ve written this out in the ‘non’ prototype way which isn’t very elegant. It works but I’d like to make it
more robust and use prototype. So,.... I’m trying to use clonePosition to match the location and
size of my hover (the object ‘elmnt’ in the function below) 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. Any help with what I’m doing wrong would be
great, or if there is something out there that you could point me
to that has already solved this that’d be great too.
Much thanks in advance again to you Christophe for the book and to anyone who reads this and can help.

-Paul

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"; }
 
Headshot_120px_small Christophe P... 28 posts

Hey Paul,

I’m not so sure I’d like this book’s forums to turn into a forked support forum. The official ML is very good at that, and when I want to spend some time fielding support requests, I go there. So do you, apparently, as you posted that same question there just one hour before you posted here. Our beloved Kangax answered you 30 minutes later, suggesting something: follow up on that.

These forums are, from my humble point of view, more about discussing the book itself, its contents, its direction, philosophy, wishlist for future editions, etc. and asking about clarifications on examples or such.

As for your question, I would have answered pretty much like Kangax did. Try it out!

Best,

Christophe

 
Generic-user-small Paul Ramos 2 posts

Sorry for the multi post. I wasn’t sure where I’d get my answer from.
But, yes Kangax did solve my problem. :)

I’ll keep my support questions to the official ML , and book edition questions here. :)
Thanks again for being an invaluable resource!

-Paul

3 posts, 2 voices