Javascript Tooltips, Popups, Captions - BoxOver  

Go Back   Javascript Tooltips, Popups, Captions - BoxOver > BoxOver > Suggestions
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2007, 02:53 PM
mpemburn mpemburn is offline
Junior Member
 
Join Date: Mar 2007
Location: Bel Air, MD USA
Posts: 1
Default Using iframe "shim" technique to circumvent hiding selects in IE

Hi,

I ran across this technique the other day and it works like a champ! It allows you to position objects over selects (combo boxes) in Internet Exploder rather than having to hide them. It's based on a this article by Joe King:

http://dotnetjunkies.com/WebLog/jkin...07/21/488.aspx

In essence, you create an empty iframe, then re-size it and place it beneath your object one layer down (i.e., set the z-index to one less than that of the object). This is sufficient to hide anything beneath the object and those pesky selects stop bleeding through -- as they do without fuss in all other browsers . . .

I've adapted boxover.js to use this technique -- here's how:

1. Add the following at the top (with the vars):


var boxoverShim;
if (window.createPopup && !window.XmlHttpRequest) {
document.write('<IFRAME id="boxoverShim" src="" style="display: none; left: 0; top: 0; z-index: 0; position: absolute; filter: progidXImageTransform.Microsoft.Alpha(style=0,op acity=0)" frameBorder="0" scrolling="no"></IFRAME>')
boxoverShim = document.getElementById("boxoverShim")
}



2. Add the following functions at the end of the the file:


function showShim(boxoverObject) {
try {
with (boxoverShim.style) {
left = boxoverObject.style.left;
top = boxoverObject.style.top;
width = boxoverObject.offsetWidth+"px";
height = boxoverObject.offsetHeight+"px";
zindex = -1;
display = (boxoverObject.style.visibility == "visible") ? "block" : "none";
}
} catch (e) {
}
}

function hideShim(boxoverObject) {
try {
boxoverShim.style.display = 'none';
} catch (e) {
}
}


3. Add a call to the showShim as the last line in the code block that begins with if (boxMove&&CBE) { in the moveMouse function.

4. Add a call to hideShim to the end of both the showHideBox and hideBox functions.

That's it!

Enjoy,

Mark Pemburn
Pemburnia Consulting
Reply With Quote
  #2  
Old 04-04-2007, 02:51 PM
HenryHartley HenryHartley is offline
Junior Member
 
Join Date: Nov 2006
Posts: 20
Default

See:

http://boxover.swazz.com/forum/boxov...ie-t422-1.html

Be sure to follow the thread to the bottom as there are some fixes and other information that you might find useful.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:08 PM.