...

View Full Version : windowed objects?



crmpicco
08-16-2005, 10:58 AM
.demo {color:#000033; background-color:<%=bgCol%>; layer-background-color:#cccccc; position:absolute; bottom:10px; width:700px; height:100px; visibility:hidden; z-index:5}

<select name="pre" class="drop" tabindex="" onchange="javascript: sortLeg1(this.options[this.selectedIndex].value)" style=" position: absolute; z-index:9;">
....options........
</select>

<div id="demodiv" class="demo">
<table>
<tr>
<td><font face="verdana" size="-2" color="#FFFFFF"><b>Rules</b></font></td>
</tr>
<tr>
<td><font face="verdana" size="-2" color="#FFFFFF"><b>Heading</b></font></td>
<td><font face="verdana" size="-2" color="#FFFFFF"><b>Content</b></font></td>
</tr>
</table>


i have a problem with this onMouseOver.
It seems to have something to do with select being a windowed object.
the div (onMouseover) does not cover the select boxes, they show through.
is there a way around this?

mlse
08-16-2005, 11:20 AM
¿Qué?

crmpicco
08-16-2005, 11:24 AM
http://dotnetjunkies.com/WebLog/jking/archive/2003/10/30/2975.aspx

crmpicco
08-16-2005, 11:25 AM
<html>
<head>
<script>
function DivSetVisible(state)
{
var DivRef = document.getElementById('PopupDiv');
var IfrRef = document.getElementById('DivShim');
if(state)
{
DivRef.style.display = "block";
IfrRef.style.width = DivRef.offsetWidth;
IfrRef.style.height = DivRef.offsetHeight;
IfrRef.style.top = DivRef.style.top;
IfrRef.style.left = DivRef.style.left;
IfrRef.style.zIndex = DivRef.style.zIndex - 1;
IfrRef.style.display = "block";
}
else
{
DivRef.style.display = "none";
IfrRef.style.display = "none";
}
}
</script>
</head>
<body>
<form>
<select>
<option>A Select Box is Born ....</option>
</select>
</form>
<div
id="PopupDiv"
style="position:absolute; top:25px; left:50px; padding:4px; display:none; background-color:#000000; color:#ffffff; z-index:100">
.... and a DIV can cover it up<br>through the help of an IFRAME.
</div>
<iframe
id="DivShim"
src="javascript:false;"
scrolling="no"
frameborder="0"
style="position:absolute; top:0px; left:0px; display:none;">
</iframe>
<br>
<br>
<a href="#" onclick="DivSetVisible(true)">Click to show DIV.</a>
<br>
<br>
<a href="#" onclick="DivSetVisible(false)">Click to hide DIV.</a>
</body>
</html>

Kor
08-16-2005, 11:39 AM
the div (onMouseover) does not cover the select boxes, they show through.

AFAIK there is nothing you can do about, unless you:
1 - change the design, so that the div woun't cover the form's elements
2 - make the select visible/hidden onmouseover
3 - build a "pseudo" select element using DOM (&graphics) methods.

Vladdy
08-17-2005, 01:27 AM
3: http://www.codingforums.com/showthread.php?t=14300

Kor
08-17-2005, 09:55 AM
Yes, Vladdy, your code was in my mind, but I was not able to remember where it can be found...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum