views:

272

answers:

2

I almost figure this out, can anyone tell me as to why my $.unblock never executes?

    $(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();});


            }); 

    });
A: 

Is the getScript function correctly executing? (I'm sorry, I just signed up and don't have a high enough 'reputation' to post comments)

CodeJoust
A: 

The solution to this was to call unblock method from the managed code (C# to javascript). In other words, when you make a selection you call block, do your work (i.e. call server, etc) and then call unblock at the end. The calls to block and unblock are made from managed code (c#) but the actual work is performed in the javascript (because this is jQuery)

ra170