This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Locked pop-up windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Locked pop-up windows" Watch "Locked pop-up windows" New topic
Author

Locked pop-up windows

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 819
On alot of sites nowadays you see windows popping up on top of forms asking for a username and password or such. When these locked windows popup everything on the page greys out and you can't type anything in on the background fields. Any idea what is used to achieve this? Would this normally be an applet or is it likely HTML/Javascript/CSS? If you go to www.monster.com and try and look at a resume it prompts you for username and password. The same effect is what I'm looking for. Any help would be appreciated. Thanks.

Rob
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

It's all just HTML and JavaScript. That's simply a block element with a high z-index. The grayed out background is achieved by creating a block element that covers the window with an opacity value.



[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 819
Thanks Bear. I thought that the greyed out effect was accomplished by disabling a div container or something and I also thought it may have involved an applet. Thanks for the info.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

No applets needed.

If you want to see an example, check out http://www.bibeault.org/blackbox/. (Uses jQuery, naturally.)
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
There are a bunch of scripts out there. Google: lightbox or thickbox

Eric
 
GeeCON Prague 2014
 
subject: Locked pop-up windows