SlammingRumJoseph
asked on
!!ASP.NET ListBoxs appearing on top of Panels!!
Guys,
I am currenly building a page that displays a summary of information in a panel over the top of a page that has listboxs on it. As is typical with DropDownLists, they appear ontop of the panel. Is there any way to stop this? This problem has come up before and i desperately require a solution.
Thanks guys,
Neil
I am currenly building a page that displays a summary of information in a panel over the top of a page that has listboxs on it. As is typical with DropDownLists, they appear ontop of the panel. Is there any way to stop this? This problem has come up before and i desperately require a solution.
Thanks guys,
Neil
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i have thought of that but i was hoping to avoid that solutions if possible.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
On thing that i would like to mention here is that dd lists, activex controls and applets have Z-order higher than all controls. so they will always render on the top of other controls.
In our applciation we have some menus and when user is selecting any item from menu and page under this menu has some dd list this dd list appears on top of menu.
One solution that we are using here is hiding the drop down list in the page when user is selecting any item from menu and any dd list is there on the page. It will hide only those dd list which are causing problems.
Here is the javascript code that we are using to hide the dd list
set the id of <td> having any drop down list to "drop" and call the function makeTheImageLayers(3) on load event of the body tag. Count number of ddlists and pass this number to makeTheImageLayers function.
var Temp = new Array();
var count=0;
var nDrops=0; // it will contain the total number of drop downs
var Dhtml_frm;
var D_htmlTable = new Array();
var D_htmlTextBox = new Array();
var hiddenCombos = new Array();
var hc_Count=0;
//call this function in the <bodg> under the onload event
function makeTheImageLayers(nD)
{
//setting out the references
Dhtml_frm = document.forms[0];
imgHiddenCombos();
//alert(Dhtml_frm)
var styleWidth = 155;
nDrops=nD;
var i=0;
for(i=0; i<nD; i++)
{
var D_html="";
D_html = "<TABLE id='D_htmlTable_nf' cellSpacing='0' cellPadding='0' width='300' border='0' style='WIDTH:" + styleWidth + "px;height:22px;display:no ne'>"
D_html = D_html + "<TR>"
D_html = D_html + "<TD style='WIDTH:" + (styleWidth-16) + "px;height:22px;'><input type='text' id='D_htmlTextBox_nf' style='width:" + (styleWidth-16) + "px;height:22px;BORDER-RIG HT-STYLE: none;PADDING-LEFT: 3px;' name='t' value=''></TD>"
D_html = D_html + "<TD style='WIDTH:16px';height: 22px;><IMG alt='' src='../images/arrow.gif'> </TD>"
//D_html = D_html + "<TD style='WIDTH:16px;height:2 2px;'><inp ut type=Button value='▼' name=bbb style='WIDTH:16px;height:2 1px;font-s ize:7pt;BO RDER-RIGHT : thin outset; BORDER-TOP: groove; BORDER-BOTTOM: thin outset; BORDER-LEFT-STYLE: none;'></TD>"
D_html = D_html + "</TR>"
D_html = D_html + "</TABLE>"
if (nD < 2)
Drop.innerHTML = Drop.innerHTML + D_html;
else
Drop[i].innerHTML = Drop[i].innerHTML + D_html;
if(i < 1){
D_htmlTable[i]=D_htmlTable _nf
D_htmlTextBox[i] = Dhtml_frm.D_htmlTextBox_nf
}
else{
D_htmlTable[i]=D_htmlTable _nf[i];
D_htmlTextBox[i] = Dhtml_frm.D_htmlTextBox_nf [i];
}
}
}
function searchHiddenCombos(cmbName )
{
var hi=0;
for(hi=0; hi<hc_Count; hi++)
{
if ( hiddenCombos[hi] == cmbName )
{
//alert(hiddenCombos[hi])
return true;
}
}
return false;
}
function imgHiddenCombos()
{
var ci=0;
hc_Count = 0;
for(ci=0; ci<Dhtml_frm.length; ci++)
{
if (Dhtml_frm.elements[ci].st yle.displa y == "none" || Dhtml_frm.elements[ci].sty le.visibil ity == "hidden")
{
// if(hc_bit==false)
// {
hiddenCombos[hc_Count] = Dhtml_frm.elements[ci].nam e;
//alert(hiddenCombos[hc_Co unt])
hc_Count++;
// }
}
}
}
Let me know if i could solve your problem
Hamood
In our applciation we have some menus and when user is selecting any item from menu and page under this menu has some dd list this dd list appears on top of menu.
One solution that we are using here is hiding the drop down list in the page when user is selecting any item from menu and any dd list is there on the page. It will hide only those dd list which are causing problems.
Here is the javascript code that we are using to hide the dd list
set the id of <td> having any drop down list to "drop" and call the function makeTheImageLayers(3) on load event of the body tag. Count number of ddlists and pass this number to makeTheImageLayers function.
var Temp = new Array();
var count=0;
var nDrops=0; // it will contain the total number of drop downs
var Dhtml_frm;
var D_htmlTable = new Array();
var D_htmlTextBox = new Array();
var hiddenCombos = new Array();
var hc_Count=0;
//call this function in the <bodg> under the onload event
function makeTheImageLayers(nD)
{
//setting out the references
Dhtml_frm = document.forms[0];
imgHiddenCombos();
//alert(Dhtml_frm)
var styleWidth = 155;
nDrops=nD;
var i=0;
for(i=0; i<nD; i++)
{
var D_html="";
D_html = "<TABLE id='D_htmlTable_nf' cellSpacing='0' cellPadding='0' width='300' border='0' style='WIDTH:" + styleWidth + "px;height:22px;display:no
D_html = D_html + "<TR>"
D_html = D_html + "<TD style='WIDTH:" + (styleWidth-16) + "px;height:22px;'><input type='text' id='D_htmlTextBox_nf' style='width:" + (styleWidth-16) + "px;height:22px;BORDER-RIG
D_html = D_html + "<TD style='WIDTH:16px';height:
//D_html = D_html + "<TD style='WIDTH:16px;height:2
D_html = D_html + "</TR>"
D_html = D_html + "</TABLE>"
if (nD < 2)
Drop.innerHTML = Drop.innerHTML + D_html;
else
Drop[i].innerHTML = Drop[i].innerHTML + D_html;
if(i < 1){
D_htmlTable[i]=D_htmlTable
D_htmlTextBox[i] = Dhtml_frm.D_htmlTextBox_nf
}
else{
D_htmlTable[i]=D_htmlTable
D_htmlTextBox[i] = Dhtml_frm.D_htmlTextBox_nf
}
}
}
function searchHiddenCombos(cmbName
{
var hi=0;
for(hi=0; hi<hc_Count; hi++)
{
if ( hiddenCombos[hi] == cmbName )
{
//alert(hiddenCombos[hi])
return true;
}
}
return false;
}
function imgHiddenCombos()
{
var ci=0;
hc_Count = 0;
for(ci=0; ci<Dhtml_frm.length; ci++)
{
if (Dhtml_frm.elements[ci].st
{
// if(hc_bit==false)
// {
hiddenCombos[hc_Count] = Dhtml_frm.elements[ci].nam
//alert(hiddenCombos[hc_Co
hc_Count++;
// }
}
}
}
Let me know if i could solve your problem
Hamood
Solutions have been offered and the user hasn't responded. I recommend splitting the points.
I concur...Aeros
Me.MyDropDownList.Visible = False