Well im using jQuery and blockUI in asp.net i love jquery and blockUI but i found a problem when displaying a panel with a asp.net button in them the actual button is moved out of the form tag, so when you click the button nothing happens..
is there any way to configure blockUI to place its content tags last in the forms tag instead in the body tag!
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Now im not 100% sure this is the best solution but i did go into the jquery.blockUI.js and replaced a few lines..
Replace this line
var layers = [lyr1, lyr2, lyr3], $par = full ? $('body') : $(el);
with
var layers = [lyr1, lyr2, lyr3], $par = full ? $('form') : $(el);
Replace this line
$('html,body').css('height', '100%');
with
$('html,body,form').css('height', '100%');
Replace this line
els = $('body').children().filter('.blockUI').add('body > .blockUI');
with
els = $('form').children().filter('.blockUI').add('body > form > .blockUI');
and it seems to be working so far haven’t tested more than one browser yet!!
Method 2
If I understand correctly, you’re looking to block just the form when a button is clicked outside the form. If that’s the case BlockUI supports element level blocking like this:
$('#blockButton').click(function() {
$('form').block({ message: null });
});
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0