Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7969467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:14:29+00:00 2026-06-04T07:14:29+00:00

I am using jquery block UI plugin, my requirement is to check if user

  • 0

I am using jquery block UI plugin, my requirement is to check if user is authorized user or not, here is my code

<script language="javascript" type="text/javascript">

        $(document).ready(function () {
            $('#btnsubmit').click(function () {
                $.blockUI({ css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#000',
                    '-webkit-border-radius': '10px',
                    '-moz-border-radius': '10px',
                    opacity: .5,
                    color: '#fff'
                }
                });
            });
        }); 

     function ajaxAuth() {
       //UserLogin.IServiceLogin.HelloWorldCC(OnSuccess, OnFailure);
         var usrname = document.getElementById('txtusrname').value;
         var pasd = document.getElementById('txtpassword').value;
         UserLogin.IServiceLogin.GetUseCred(usrname, pasd, onSuccess, onFailed);
     }

     function onSuccess(result) {
         setTimeout($.unblockUI, 0);
         var obj = jQuery.parseJSON(result);

         if (obj.name != "error" ) {
             document.getElementById('labusr').value = obj.name;
             document.getElementById('labpass').value = obj.passd;
             document.getElementById('labkey').value = obj.key;
             location.href = "DesignAPage.aspx";
         } else {
             $.blockUI({ message: $('#question'), css: { width: '350px'} });

//             $('#ok').click(function () {
//                 $.unblockUI();
//                 return false;
//             }); 
         }
     }

     function onFailed(result) {
         alert("failure");
     }

    </script>

so the problem is while i am using $.blockUI({ message: $('#question'), css: { width: '350px'} }); it just blocks the screen for a second and unblocks the screen.

Any help is greatly appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:14:30+00:00Added an answer on June 4, 2026 at 7:14 am

    try doing this in else block

    else {
                 $.unblockUI({
                     onUnblock: function () {
                         $.blockUI({ message: $('#question'), css: {
                             border: 'none',
                             padding: '15px',
                             backgroundColor: '#000',
                             '-webkit-border-radius': '10px',
                             '-moz-border-radius': '10px',
                             opacity: .5,
                             color: '#fff'
                         }
                         });
                         $('#ok').click(function () {
                             $.unblockUI();
                             return false;
                         }); 
                       }
                 }); 
             }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using JQuery UI plugin blockUI to block UI for every ajax request.
I am trying to block click on links using jQuery blockUI plugin. It's seems
I have the following block of jQuery code that I'm using to copy some
I am using this jQuery plugin: http://api.jquery.com/slideToggle/ I have this code: <div id=panel><form action=postit.php
I'm using jQuery with the BlockUI plugin to block a page after a link
I am using a simple jQuery plugin to style my javascript alerts. The problem
I am using the http://bassistance.de/jquery-plugins/jquery-plugin-validation/ plug in with the follow pseudo block that I
I am using jQuery Address Plugin and I have the following code. $.address.change(function(e) {
I am using the jquery validate function and plugin located here. http://docs.jquery.com/Plugins/Validation I am
I'm using the jQuery Cycle plugin. The page in question is here: http://harrisonfjord.com/folio/test.html The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.