Forum start - Register
Name Password Forgot your password?

Forum start > web > development > Very Cool thing I figured out today
Author
Thread
byerspc
Admin
avatar

 

Location: South Bend, IN
Registered: 4/14/2006    Warnings: 0
Very Cool thing I figured out today
How to dim the background and display a loading message when you have an ajax update panel etc.
You use the control UpdateProgress and tie it to your Update Panel

example:
<asp:UpdateProgress ID="updProgress"
AssociatedUpdatePanelID="UpdatePanel1"
runat="server" DisplayAfter="100" DynamicLayout="true" >
<ProgressTemplate>
<div id="darkenBackground">
</div>
<div id="loading">
<img src="empower.gif" />
<br />
<br />
<img src="bigRotation2.gif"/>
<br />
Loading...
</div>
</ProgressTemplate>
</asp:UpdateProgress>

You then use css to set up your divs
#loading {
width:300px;
height: 150px;
position: fixed;
top: 45%;
left: 40%;
background: #294163;
text-align:center;
padding:10px;
color:white;
font:normal 16px Tahoma, Geneva, sans-serif;
border:2px solid #FFFFFF;
margin-left: -50px;
margin-top: -50px;
z-index:3;
overflow: auto;
}
#darkenBackground {
background-color: rgb(0, 0, 0);
opacity: 0.7; /* Safari, Opera */
-moz-opacity:0.70; /* FireFox */
filter: alpha(opacity=70); /* IE */
z-index: 2;
height: 100%;
width: 100%;
background-repeat:repeat;
position:fixed;
top: 0px;
left: 0px;
}

Very cool effect and pretty easy to do.
__________________
byerspc
byerspc@gmail.com
4/16/2009 09:49 Link - Ip: Logged - Quote:
Forum start > web > development > Very Cool thing I figured out today

Quick reply
You need to login before you can post.


Powered by ASPBB v0.5.2
© 2004-2006 ASPBB Developers team