Covering up a dropdownlist

J

Jon Delano

Hey all

I have this web application that is run in a hospital and after a specified
amount of time of inactivity it automatically logoffs the user off.
The docs don't like this, so i changed to using a label to cover the
screen's contents and popped up a little window for them to enter their
password to "resume" their session.

This works perfect they love it !!!

BUT ......

If there is a dropdownlist on the screen when the label covers it .. you can
still see the dropdownlist. Why ?
I did the bring to front on the label AND .. bring to back on the
dropdownlists. Nothing works. I replaced my listbox with a textbox same
thing.
Then I tried a panel. Still can see the stupid dropdown, what makes this
control so special that is displays no matter what is on top of it ??

Is there some way of using client side java or vbscript (this only runs in
IE) to check the main screen for dropdownlists and set their
style.visibility to hidden and then I can look though again when they resume
and set them back to visible?

Thanks for any assistance
Jon
 
G

Greg Collins [Microsoft MVP]

Unfortunately, this is a problem with Microsoft's rendering engine (Trident). It's annoying and very ugly, but for whatever reason, the drop-down list box always appears on top of everything. I have not found a way around this... if someone else has, I'd love to hear it too.
 
T

tfsmag

after the event fires that makes the label cover up the content could
you not just add this to your dropdownlists?

DropDownList1.Attributes.CssStyle.Add("display", "none")


this will render it invisible to the browser, once they are logged back
in you could just remove the attribute like so.

DropDownList1.Attributes.CssStyle.Remove("display")

I just did a basic test and it seems to work for me.
 
G

Guest

Jon,
This is a pretty common issue. There are several "fixes" the one that best
comes to mind is to sandwich a transparent IFRAME in over the dropdown.
Betrand Leroy has a blog post I remember seeing one solution on. Search
"Bertrand Leroy" "IFRAME".
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top