Dropdown list with jquery and blockui

I almost figured it out, can anyone tell me why my $ .unblock never gets executed?

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

                var dropdownvalue = $('#somedropdown').val();       
var xaml1obj = document.getElementById("Xaml1");       
               $.getScript(xaml1obj.Content.scriptableObject.InitializeSomething(dropdownvalue), function(){$.unblockUI();});


            }); 

    }); 

      

0


a source to share


1 answer


The solution to this is to call the unlock method from managed code (C # to javascript). In other words, when you make an allocation, you call the block, do your job (i.e. the call server, etc.), and then call the unlock at the end. Calls to block and unblock are done from managed code (C #), but the actual work is done in javascript (because it's jQuery)



0


a source







All Articles