Is there any one can give me the idea how to grey out a web page ?
When being greyed out, all the web elements will also be disabled.
The point is I would like to have the main page deactivated while a certain dialog box (pop up window) is being run.
thanks.
How to grey out a web page
Moderator: General Moderators
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Re: How to grey out a web page
Why not look into some existing code that does the same thing. Chances are they'll have it wrapped in a nice function for you to lift right out. LightBox is one thing I know that does this for sure.
Re: How to grey out a web page
Checkout GreyBox
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: How to grey out a web page
http://www.jabcreations.com/blog/
Click on 'Site Options' or 'Site Themes' at the top right.
Don't use a framework, just change the class of the page's parent most element (but don't use body).
JavaScript
XHTML
But for my site's layers I trigger a function which fades the 'body' ID's opacity and then displays a layer. Pretty simple. 
Click on 'Site Options' or 'Site Themes' at the top right.
Don't use a framework, just change the class of the page's parent most element (but don't use body).
JavaScript
Code: Select all
function change(id, newClass) {identity=document.getElementById(id); identity.className=newClass;}Code: Select all
<A href="javascript: change('my_id', 'my_class');">change element</a>