Page 1 of 1
How to grey out a web page
Posted: Fri Sep 12, 2008 3:32 am
by denisw
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.
Re: How to grey out a web page
Posted: Fri Sep 12, 2008 6:57 am
by jayshields
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
Posted: Fri Sep 12, 2008 7:43 am
by marcth
Re: How to grey out a web page
Posted: Fri Sep 12, 2008 8:14 pm
by JAB Creations
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
Code: Select all
function change(id, newClass) {identity=document.getElementById(id); identity.className=newClass;}
XHTML
Code: Select all
<A href="javascript: change('my_id', 'my_class');">change element</a>
But for my site's layers I trigger a function which fades the 'body' ID's opacity and then displays a layer. Pretty simple.
