Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can <select> go behind <div>

Status
Not open for further replies.

Jay1Roy

Programmer
Jul 10, 2001
95
IE
Hi All,

I have a problem that has gone critical now... I have a popping up <div> with some message but the <select>s don't go behind the popup they show up shamelessly...:-(

This is very frustrating now.... any help will be greatly appreciated.

Thanks in advance...

Roy.
user.gif
 
I know exactly how you feel RoyOBoy. I use this script to hide all selects from the page whenever I put a div in front of everything. but it really hides the <select> completely so I only use when I know I need to show a div in front of a select box. Not easy to implement but I hope you will find a solution.

function hideFormSelect()
{
if (!document.all)
{
return; // only Internet Explorer is affected by the bug
}
var dfl = document.forms.length;
for (var i = 0; i < dfl; i++)
{
var dfle = document.forms.elements.length;
for (var j = 0; j < dfle; j++)
{
if (document.forms.elements[j].type.indexOf('sel') != -1)
{
document.forms.elements[j].style.visibility = 'hidden'
}
}
}
}

function showFormSelect()
{
if (!document.all)
{
return; // only Internet Explorer is affected by the bug
}
var dfl = document.forms.length;
for (var i = 0; i < dfl; i++)
{
var dfle = document.forms.elements.length;
for (var j = 0; j < dfle; j++)
{
if (document.forms.elements[j].type.indexOf('sel') != -1)
{
document.forms.elements[j].style.visibility = 'visible';
}
}
}
} Gary Haran
 
Hi guys,

Thanks for the help... I got the thing going with an IFRAME!

Cheers!

Roy.
user.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top