PDA

View Full Version : Drop-Down-Menu under iframe (.pdf)



jemies
02-26-2008, 09:11 PM
1) Script Title: Jim's DHTML Menu v5.7

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/jimmenu/index.htm

3) Describe problem:

The Menu opens under the iframe, which contains a .pdf-document.

<iframe src="xy.pdf" type="application/pdf"></iframe>
I read about this problem several times concerning flash-iframes. But the solution there:

wmode="transparent" don't work with .pdf.

Might be, the only solution is, to hide the iframe, when mouseover occurs to menu. Like this thread proposes for selects (http://www.dynamicdrive.com/forums/showthread.php?t=14304&highlight=iframe+menu):


to set the select's visibility property to hidden while the drop down is over it...


As far as I understand, the following code (http://www.dynamicdrive.com/forums/showthread.php?t=7913&highlight=drop+menu+iframe&page=3) would help:



function hide_dropdowns(what){
if(what=="in"){
var anchors = document.getElementsByTagName("select");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
anchor.style.position="relative";
anchor.style.top="0px";
anchor.style.left="-2000px";
}
}else{
var anchors = document.getElementsByTagName("select");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
anchor.style.position="relative";
anchor.style.top="0px";
anchor.style.left="0px";
}
}
}

in combination with:

Then..on the main parent DIV of your menu... run two events on mouseover and mouseout. Obviously so you can hide the selects on mouseover and bring them back on mouseout


onmouseout="hide_dropdowns('in')" onmouseout="hide_dropdowns('out')"


So my question would be, how I might adopt the previous code to make it hide my iframes.

Or, in case there is: Is there some more elegant way to let the menu unfold visibly over the iframe?

Many thanks
Jemies