Thursday, January 1, 2009

[jQuery] form plugin and blockUI problems in IE7 with the ui not unblocking

I'm using the form plugin and the most recent version of blockUI.

Here's my form initialization area:

$(document).ready(function() {
var options = {
target: '#search_results', // target element(s) to
be updated with server response
beforeSubmit: showRequest, // pre-submit callback
success: showResponse // post-submit callback

};

// bind to the form's submit event
$('#search_form').submit(function() {
$.blockUI();
$(this).ajaxSubmit(options);
return false;
});
});


And then here is my post submit callback function

// post-submit callback
function showResponse(responseText, statusText) {

// add sorter.
$("#myTable").tablesorter({sortList:[[0,0],[2,1]], widgets:
['zebra']});
$("#options").tablesorter({sortList: [[0,0]], headers: { 3:{sorter:
false}, 4:{sorter: false}}});

// add pager.
$("#myTable").tablesorterPager({container: $("#pager")});
$("#pager").show();

$.unblockUI();
}

All this works ok in Firefox but in IE, blockUI does not unblock. I
don't get any javascript errors and it seems like the call should go
through ok. Any ideas?

Thanks,

No comments: