<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to fade background and show a dialog box</title><link>http://msmvps.com/blogs/omar/archive/2006/08/02/How-to-fade-background-and-show-a-dialog-box.aspx</link><description>There&amp;#39;s a nice trick we do at Pageflakes whenever we show a dialog box. We make the background faded so that user&amp;#39;s attention is dragged to the dialog box and user does not get confused what to do. Here&amp;#39;s how it looks: Here&amp;#39;s how it works</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>re: How to fade background and show a dialog box</title><link>http://msmvps.com/blogs/omar/archive/2006/08/02/How-to-fade-background-and-show-a-dialog-box.aspx#1712816</link><pubDate>Tue, 04 Aug 2009 15:14:47 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1712816</guid><dc:creator>pat</dc:creator><description>&lt;p&gt;Dj_Kat: Your dialog box looks like it has opacity because it is being displayed behind the masking div. If you give it a z-index attribute with a value higher than 50000 (as that is what the masking div is set to) it will display correctly i.e. in front of the mask...&lt;/p&gt;
&lt;p&gt;Hope that helps...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1712816" width="1" height="1"&gt;</description></item><item><title>re: How to fade background and show a dialog box</title><link>http://msmvps.com/blogs/omar/archive/2006/08/02/How-to-fade-background-and-show-a-dialog-box.aspx#1536529</link><pubDate>Fri, 07 Mar 2008 16:24:04 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1536529</guid><dc:creator>chandresh</dc:creator><description>&lt;p&gt;Pl let me know this dialog box working &amp;quot;FireFox&amp;quot;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1536529" width="1" height="1"&gt;</description></item><item><title>re: How to fade background and show a dialog box</title><link>http://msmvps.com/blogs/omar/archive/2006/08/02/How-to-fade-background-and-show-a-dialog-box.aspx#1466551</link><pubDate>Wed, 16 Jan 2008 23:55:36 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1466551</guid><dc:creator>YSUT</dc:creator><description>&lt;p&gt;Is there any way to blur the background ?&lt;/p&gt;
&lt;p&gt;Thx anyway&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1466551" width="1" height="1"&gt;</description></item><item><title>re: How to fade background and show a dialog box</title><link>http://msmvps.com/blogs/omar/archive/2006/08/02/How-to-fade-background-and-show-a-dialog-box.aspx#1039997</link><pubDate>Thu, 19 Jul 2007 17:46:25 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1039997</guid><dc:creator>Dj_Kat</dc:creator><description>&lt;p&gt;How do you get the dialog box to display without opacity. I've been trying this without any luck the background fades nicely tho&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1039997" width="1" height="1"&gt;</description></item><item><title>re: How to fade background and show a dialog box</title><link>http://msmvps.com/blogs/omar/archive/2006/08/02/How-to-fade-background-and-show-a-dialog-box.aspx#620006</link><pubDate>Mon, 26 Feb 2007 17:49:13 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:620006</guid><dc:creator>Alvito</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Can u show the HTML for the div that needs to hold content. i believe the code you stated above just shows the div for the background . &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=620006" width="1" height="1"&gt;</description></item><item><title>re: How to fade background and show a dialog box</title><link>http://msmvps.com/blogs/omar/archive/2006/08/02/How-to-fade-background-and-show-a-dialog-box.aspx#558840</link><pubDate>Fri, 09 Feb 2007 15:05:44 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:558840</guid><dc:creator>jeebu</dc:creator><description>&lt;p&gt;omar,&lt;/p&gt;
&lt;p&gt;my requirement is like when opening a popup background should go grey fade...&lt;/p&gt;
&lt;p&gt;jeebu&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=558840" width="1" height="1"&gt;</description></item><item><title>re: How to fade background and show a dialog box</title><link>http://msmvps.com/blogs/omar/archive/2006/08/02/How-to-fade-background-and-show-a-dialog-box.aspx#558725</link><pubDate>Fri, 09 Feb 2007 14:23:55 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:558725</guid><dc:creator>jeebu</dc:creator><description>&lt;p&gt;omar,&lt;/p&gt;
&lt;p&gt;can this technology be implemented when u open a popu window...&lt;/p&gt;
&lt;p&gt;&amp;lt;div id=&amp;quot;blockUI&amp;quot; class=&amp;quot;translucent&amp;quot; style='display: none; background-color: gray;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width: 100%; height: 100%; position: absolute; left: 0px; top: 0px; z-index: 50000;&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;onclick=&amp;quot;return false&amp;quot; onmousedown=&amp;quot;return false&amp;quot; onmousemove=&amp;quot;return false&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;onmouseup=&amp;quot;return false&amp;quot; ondblclick=&amp;quot;return false&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;how to use this above code./...&lt;/p&gt;
&lt;p&gt;can u explain me in detail regarding it&lt;/p&gt;
&lt;p&gt;thanx&lt;/p&gt;
&lt;p&gt;jeebu&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=558725" width="1" height="1"&gt;</description></item><item><title>re: How to fade background and show a dialog box</title><link>http://msmvps.com/blogs/omar/archive/2006/08/02/How-to-fade-background-and-show-a-dialog-box.aspx#114340</link><pubDate>Tue, 05 Sep 2006 06:43:04 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:114340</guid><dc:creator>chemtech</dc:creator><description>Kind of missing a bit, no?

We can use this cross browser compliant javascript in the header to toggle the div(s):

function toggle(id){
if (document.getElementById){
var layer = document.getElementById(id);
layer.style.display = (layer.style.display == 'none') ? 'block' : 'none';
}
}

And then we can call it like:

&lt;a href="BLOCKED SCRIPTtoggle('blockUI');"&gt;Block UI&lt;/a&gt; 

Or like maybe like this if you prefer:

&lt;a href="#" onclick="toggle('blockUI');"&gt;Block UI&lt;/a&gt;

Or via another script to pop up all kinds of div goodness over top with a z-alignment greater than 50000.

BUT in Firefox the transparent opacity of BlockUI still doesn't work :(

And in IE there seems to be a slight margin on the right hand side.

Other than that it's awesome, any tips to fix it?


Kind Regards,
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=114340" width="1" height="1"&gt;</description></item><item><title>re: How to fade background and show a dialog box</title><link>http://msmvps.com/blogs/omar/archive/2006/08/02/How-to-fade-background-and-show-a-dialog-box.aspx#108002</link><pubDate>Fri, 18 Aug 2006 03:49:50 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:108002</guid><dc:creator>omar</dc:creator><description>Nicholson, yes. I do some work for Pageflakes :)&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=108002" width="1" height="1"&gt;</description></item><item><title>Another Link Round-Up</title><link>http://msmvps.com/blogs/omar/archive/2006/08/02/How-to-fade-background-and-show-a-dialog-box.aspx#107930</link><pubDate>Thu, 17 Aug 2006 10:46:34 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:107930</guid><dc:creator>Life, Universe and Everything according to Dirk</dc:creator><description>Remote Membership/Roles Management of ASP.NET 2.0 Applications Flickr-ing about with .NET VM Additions&lt;img src="http://msmvps.com/aggbug.aspx?PostID=107930" width="1" height="1"&gt;</description></item><item><title>re: How to fade background and show a dialog box</title><link>http://msmvps.com/blogs/omar/archive/2006/08/02/How-to-fade-background-and-show-a-dialog-box.aspx#106785</link><pubDate>Sat, 05 Aug 2006 16:41:40 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:106785</guid><dc:creator>Nicholson</dc:creator><description>Are you from www.pageflakes.com ?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=106785" width="1" height="1"&gt;</description></item></channel></rss>