Hi All,
Recently i have applied new message system like what we have seen in gmail and yahoo , when we delete the message,the message come for 4-5 second and after that it just fade out. First i was thinking it is going to be though.But after i implement it,i was not all that diffcult.So below is the solution .
/******************************************************************/
First we have to place a div in the master page and have to assign id to it.
<div id="msgdiv"></div>
Make the body of the master page runat="server" and have a id for it as well.
<body id="MainBody" runat="server">
we also have to add jquery file of 1.2.1min.js file :
<script src="js/jquery-1.2.1.min.js" type="text/JavaScript"></script>
Now lets say you want to show message on deleting of message from inbox.
So add the following two functions in JavaScript:
function DeleteFromInbox() {
document.getElementById("msgdiv").className = "quick-alert";
document.getElementById("msgdiv").innerHTML = "<table border='0' align='center' cellpadding='0' cellspacing='0'><tr><td><img src='images/checked_new_icon.jpg' alt='' /></td><td width='8'> </td><td>message deleted from inbox successfully.</td></tr></table>";
setTimeout("FadeOutDiv()", 2000);
}
function ErrorInDeleteing() {
document.getElementById("msgdiv").className = "quick-alert";
document.getElementById("msgdiv").innerHTML = "<table border='0' align='center' cellpadding='0' cellspacing='0'><tr><td><img src='images/checked_new_icon.jpg' alt='' /></td><td width='8'> </td><td>message was not deleted from inbox.</td></tr></table>";
setTimeout("FadeOutDiv()", 2000);
}
function FadeOutDiv() {
$(".quick-alert").fadeOut("slow", function() {
$(".quick-alert").remove();
});
}
we should have following in our css file :
.quick-alert
{
width:66%;
background:#EE5A1E; font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#fff; font-weight:bold; text-align:center; border:1px solid #727272; padding:5px; margin:3px;margin-left:100px;
}
here you can set BG-color and font size according to your design.
Now finally on the click of the delete button we have to call this function from server-side :
protected void btnDelete_Click(object sender, ImageClickEventArgs e)
{
int i = DeleteFromInbox();
// after this we can return any variable knowing if the message is deleted or not
HtmlGenericControl MasterPageBodyTag = (HtmlGenericControl)this.Page.Master.FindControl("MainBody");
if (i>0)
{
MasterPageBodyTag.Attributes.Add("Onload", "javascript:DeleteFromInbox();");
}
else
{
MasterPageBodyTag.Attributes.Add("Onload", "javascript:ErrorInDeleteing();");
}
}
/******************************************************************/
Friday, June 12, 2009
Show Error/Succcess Messages like gmail,yahoo mail through JQuery
Subscribe to:
Post Comments (Atom)
Thank you, insightful. Shouldn't there be a jquery plugin for that by now?
ReplyDeleteThe number can however represent some trouble for the individuals who are not exceptionally well known to the mail settings. As well as can be expected do in this circumstance is hunt the rundown of all the yahoo client administration helpline number via seeking the web and after that get the help that you are searching for.https://800support.net/yahoo-support/use-safe-search-yahoo-filter-adult-content/
ReplyDelete
ReplyDelete5 helpful tips to make you a better user for Skype. Contact Us@: Help Number
Facebook customer care team always available to solve critical issues of facebook account. Facebook help service team always try to their best easy and efficient solution of complex issues.Facebook Help Service Number
ReplyDeleteHow To Add Animated Or Gif Images In Yahoo Mail
ReplyDeleteWhile to add animated or GIF images, you get the errors on Yahoo mail. And receiving the errors messages on your screen. First thing on your mind that Yahoo will not accept attachment with special characters, and signs. You can take the helpful guidance via Yahoo Technical Support Toll Free Number.And get the all technical queries related to adding images problem in Yahoo mail.
You must disable the anti-virus, add-ons, and firewalls if you think they may be disrupting the Yahoo mail. If the problem still persists, then get in touch with our certified Yahoo technicians on our toll-free Yahoo customer care number for the complete solution to your Yahoo account.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteFind attachment file in Yahoo mail
ReplyDeleteIn case you are not able the download attachment file;Contact a Yahoo customer care helpline phone number support.
Nice blog has been shared by you. before i read this blog i didn't have any knowledge about this but now i got some knowledge. McAfee Antivirus software then just go through the link here. Click Here:- McAfee Antivirus Helpline Number
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHelp! Sync Yahoo Calendar with Iphone Calendar
ReplyDeleteAre you want Yahoo calendar and Iphone calendar to sync automatically? Here is easily set up Yahoo and Iphone calendar sync.Yahoo and Iphone calendar setting are check and sync both calendar.In case of any technical issues while sync Yahoo and Iphone calendar,call a certified toll free Yahoo customer service phone number anytime.
How to Install Multiple Skype on Mac
ReplyDeleteIf you want run multiple Skype accounts at a same time on System,Please contact online support expert just call Skype Customer Service Number 1-888-841-6062.
This comment has been removed by the author.
ReplyDeleteFix Authentication Failed Message for MSN Account
ReplyDeleteGet the "Authentication failed error" message for msn mail for technical issues to your account,setting issues,network issues or change the password or username etc.If you find the fix error message to get solution via MSN customer support phone number 24/7 and get the fixed error for MSN account.
Very Nice Blog I Read Your Post Its Amazing It Is Very Interesting post Thank You For Post then just go through the click here :-Buying a Old Car
ReplyDelete. Our endeavor is to introduce the to child to the joys of learning in a harmonious and eco-friendly environment and emphasize on the all round development of the child through age-appropriate learning activities. We stand committed to give our nursery school a few dimension to inculcate sanskaar in the nascent mind of the children and make them rise on the strong foundation achieve greater success in life.
ReplyDeletehttp://www.sanskaarkidskingdom.com/
aol remote support
ReplyDeleteaol live chat support
aol live chat tech support
aol help online chat
aol mail chat support
aol gold download for windows 10
aol gold download
download aol gold
download aol gold desktop
aol gold software
aol gold download link
how to install aol gold desktop
aol gold software download
free aol gold download
download aol gold software
install aol gold desktop
latest aol gold software
This, joint venture-“Vision wisdom” will certainly attract the attention of families focusing on resident property requirement or ownership approach. Simultaneously it will facilitate the kid’s educational requirement with in the vicinity our relationship in the days to come.
ReplyDeletehttp://www.sanskaarkidskingdom.com/lucknow/
This comment has been removed by the author.
ReplyDeletenice article
ReplyDeleteaol desktop gold
download aol gold software
download aol gold
download aol gold desktop
aol gold software
aol gold download link
aol gold program download
aol gold download
latest aol gold software
aol desktop gold download
aol software download
install aol desktop gold
how to install aol gold desktop
Nice Post
ReplyDeleteATT not connecting to AOL Emails
How to fix ATT Email error code 0x800CCC0F
How do I Reset AT&T Email Password
Recover ATT email password
How do I restore ATT email I accidentally deleted
Unable to send or receive email on ATT
How to fix common issues with ATT Email
How to transfer email address book to ATT. Yahoo account
Access att u-verse my account
How to unlock an AT&T email account?
At&t login
How to Reset your AT&T Password
Recover Lost AT&T Yahoo Password
Reset At&t Password
Att Password Reset
Reset Att Password
Att Email Password Reset
Reset Att Email Password
Att Email login Problem
Att Email login
Reset Att Password
How to Reset Your AT&T Email Password
Reset At&t Email Password
How Can I Retrieve my AT&T Email Password
Quickbooks error code h202 usually appears on your screen when you try to open a file that requires QuickBooks, and it may appear for any reason, when QuickBooks is not connecting to the server.
ReplyDeleteThank you for sharing such a really admire your post. Your post is great! Visit our site If you interested for Online betting.. Thank you.
ReplyDelete