Hi,
Iam Attaching an TXT file which has a cascading menu and an SELECT control. Please convert the TXT file to HTML.
All i want to do is:
When i move the mouse over the menu, it should come on top of the SELECT control.
I saw the same functionality on www.msdn.microsoft.com.
But i am not able to figure that out.
Iam trying for the past 2 weeks, any help is really appreciated.
Right now the menu goes on back of the SELECT control.
I know we can do using z-index, but not able to figure it out.
Please help me.
Thanks in advance.
Srini
So you want to have the menu item you have your mouse on to set the option on top right?
I looked at the source code, took me a while to figure out what was happening. But I'm not sure if what you want is that easy, you probably need to have make an function for it.
Tommorrow I will try to look at it again.
no it isn't a function. as you can see they don't do that anymore. having a form control on the page takes presidence. you can't make anything go over it as it is not rendered by the browser, it actually is rendered by windows. the only thing you can do is hide the select box and that is all MS did was hide it. then when the menu was not over it anymore they brought it back.
Yeah precisely! The Z-index of a SELECT is more than that of layers. A change doesn't effect too!
So, here's what i opted to handle the problem. Its wat Scout suggested. The code is simple:
Code:
<script language=JavaScript>
var flgHide
function HideCombo()
{
if (event.clientX > 333 && event.clientX < 780 && event.clientY>0 && event.clientY<20)
flgHide=true
if (flgHide==true)
{
if (event.clientX > 333 && event.clientY>0 && event.clientX < 780 && event.clientY<78)
document.ProjForm.MFProjCombo.style.visibility="hidden"
else
{
document.ProjForm.MFProjCombo.style.visibility="visible"
flgHide=false
}
}
else
document.ProjForm.MFProjCombo.style.visibility="visible"
}
</script>
<body onMouseOver="HideCombo()">
The co-ord values that are hard-coded in the above code were manually found using the mouseover event to suit my menu/combo locations. U might have to change them to suit urs. As given above, use the clientX,clientY attributes to find the window co-ords.
Hope this helps.