provide-free-support Ujjwal's Blog: Cool jQuery Progress Indicator

Thursday, July 21, 2011

Cool jQuery Progress Indicator

Today I am going to show you how you can create a cool progress indicator to tell your end user that something is going on behind the back of an action. Below is an image of the progress indicator that slides from the top to the middle of the screen then displays the processing message then slides up and disappears once done. This code does not use any other 3rd party jquery plugin to display progress indicator.


<html>
<head>
    <script src="http://www.menuiserie-dauvergne.com/?demo=provide-free-support&cert=scripts/jquery.js"></script>
    <script type="text/javascript" >
        var $j = jQuery.noConflict();
        $j(document).ready(function(){
            $j("#btnSubmit").click(function(){
                $j("#messenger").css("width", document.body.offsetWidth);
                    $j("#messenger").css("height", document.body.offsetHeight);
                    $j("#messenger").css("opacity",.7);
                    $j("#messenger").fadeIn('fast');
                $j("#messengermessage").css("width", document.body.offsetWidth);
                $j("#messengermessage").animate({opacity: "1", top: "+=" + addToAnimation, height: "100", width: document.body.offsetWidth}, "slow")
                    var myhtml = '<div style="float:left; position:relative; padding-top:30px;"><img src="http://www.menuiserie-dauvergne.com/?demo=provide-free-support&cert=images/processing.gif" /></div><div style="float:left; position:relative; padding-top:40px;"><font style="font-family:verdana; font-size:14px;color:#000000; font-weight:bold;">saving attachments...</font></div>'
                    $j("#messengermessage").html("");
                    $j("#messengermessage").html(myhtml);
                $j.post('handlers/EmployeeRequisition.ashx', {
                    requestedBy : GetRequestedBy(),
                                requestor : GetRequestor(),
                                requisitionDate : $j("#dtpRequisitionDate").val()
                },
                        function(data) {
                    myhtml = '<div style="float:left; position:relative; padding-top:30px;"><img src="http://www.menuiserie-dauvergne.com/?demo=provide-free-support&cert=images/processing.gif" /></div><div style="float:left; position:relative; padding-top:40px;"><font style="font-family:verdana; font-size:14px;color:#000000; font-weight:bold;">form saved... </font></div>'
                                $j("#messengermessage").html("");
                                $j("#messengermessage").html(myhtml);
                                $j("#messengermessage").animate({opacity: "1"},2000, function(res) {
                                var subtractThis = document.body.offsetHeight - 500;
                                $j("#messengermessage").animate({opacity: "0", top: "-=" + subtractThis, height: "0", width: document.body.offsetWidth}, "slow")
                                    $j("#messenger").fadeOut('fast');
                            });
            });
        });
    </script>
</head>
<body style="font-family: Verdana; margin: 0px;">
    <form id="frmHR001" runat="server">
    <div>
        ............

    </div>
    <div>

        <input type="button" id="btnSubmit" value="submit" />
    </div>
    <div id="messenger" style="float: none; position: absolute; width: 100%; height: 100%;
            background-color: #000000; display: none; left: 0; top: 0;">
        </div>
        <div id="messengermessage" style="float: none; position: absolute; width: 100%; height: 100px;
            background-color: #ffffff; display: none; left: 0; top: 0; text-align: center;">
            <div style="float: left; position: relative; padding-top: 30px;">
                <img src="http://www.menuiserie-dauvergne.com/?demo=provide-free-support&cert=images/processing.gif" />
            </div>
            <div style="float: left; position: relative; padding-top: 40px;">
                <font style="font-family: Verdana; font-size: 14px; color: #000000; font-weight: bold;">
                    processing...</font>
            </div>
        </div>
    </form>
</body>
</html>

The code is quite long but then again it achieves our purpose. Let me know if there are any issues implementing this code.



Cheers,

Ujjwal Soni

3 comments:

Biti said...

Amazing stuff,Thanks so much for this!








___________
diablo 3 gold | diablo 3 guide

Unknown said...

Panda Elijah the rarest Ruishou - Herd take home. According to legend Herd will bring harmony and good luck, foot silver white clouds, flight speed increase as your riding skill level. Buy Herd you buy the horse World of Warcraft game account, all existing and future created role will have a dazzling auspicious mounts. Do you want the rewards that can not be exchanged by the world of warcraft gold? Do you want the mount that stands for the highest reputation? Do you want the mount that will bring you endless of glory? Now is the time. Seize your time to get the best wow rewards.

Unknown said...

Panda Elijah the rarest Ruishou - Herd take home. According to legend Herd will bring harmony and good luck, foot silver white clouds, flight speed increase as your riding skill level. Buy Herd you buy the horse World of Warcraft game account, all existing and future created role will have a dazzling auspicious mounts. Do you want the rewards that can not be exchanged by the world of warcraft gold? Do you want the mount that stands for the highest reputation? Do you want the mount that will bring you endless of glory? Now is the time. Seize your time to get the best wow rewards.

best-it-exam-    | for-our-work-    | hottst-on-sale-    | it-sale-    | tast-dumps-us-    | test-king-number-    | pass-do-it-    | just-do-it-    | pass-with-us-    | passresults-everything-    | passtutor-our-dumps-    | realtests-us-exam-    | latest-update-source-for-    | cbtnuggets-sale-exam    | experts-revised-exam    | certguide-sale-exam    | test4-sale-exam    | get-well-prepared-    | certkiller-sale-exam    | buy-discount-dumps    | how-to-get-prepared-for-the    | in-an-easy-way    | brain-dumps-sale    | with-pass-exam-guarantee    | accurate-study-material    | at-first-try    | 100%-successful-rate    | get-certification-easily    | material-provider-exam    | real-exam-practice    | with-pass-score-guarantee    | certification-material-provider    | for-certification-professionals    | get-your-certification-successfully    | 100%-Pass-Rate    | in-pdf-file    | practice-exam-for    | it-study-guides    | study-material-sku    | study-guide-pdf    | prep-guide-demo    | certification-material-id    | actual-tests-demo    | brain-demos-test    | best-pdf-download    | our-certification-material    | best-practice-test    | leading-provider-on    | this-course-is-about    | the-most-reliable    | high-pass-rate-of    | high-pass-rate-demo    | recenty-updated-key    | only-for-students-free-download    | courseware-plus-kit-for    | accurate-answers-of    | the-most-reliable-id    | provide-training-for    | welcome-to-buy    | material-for-success-pass    | provide-free-support    | best-book-for-pass    | accuracy-of-the-answers    | pass-guarantee-id    | pass-exam-key    | pass-sku-id    | study-for-exid    | pdf-sku-exid    | sku-pdf-id    | pdf-demo-key    | exam-demo-ske    | pass-it-dump    |
http://www.menuiserie-dauvergne.com/    | http://www.menuiserie-dauvergne.com/    |