Hi,
I have a question. I was working with the version jquery.blockUI 2.10 and when I update my version to 2.66.0 I started to have a weird behavior
The overlay with the new version show up but immediately disappear.
There is a web user control (.ascx) that hold the division and the blockUI script. There is a page that uses this web user control calling a function named
OnLoadOverlay,
that should display the Overlay
. In the overlay we enter a number that is captured in textbox1 and this value is returned to the aspx page calling a function (
OnChangeAmount)
the lives in the page
For some reason is not working properly with the new version of jquery.blockUI.
Thanks in advance for any help.
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Overlay1.ascx.cs" Inherits="Overlay1" %>
<%@ Import Namespace="ApplicationMdl" %>
<link href="overlay.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery.blockUI.js" type="text/javascript"></script>
<script type="text/javascript">
var textbox = null;
var product = null;
function OnLoadOverlay(currentTextBox, currentProduct) {
textbox = currentTextBox;
product = currentProduct;
$.blockUI({
message: $('#overlay'),
css: {
textAlign: 'center',
left: ($(window).width() - 500) /2 + 'px',
top: ($(window).height() - $('#test').height())/2 + 'px',
width: '500px',
border: '0px'
}
});
}
$(function () {
$('#id1').click(function(e) {
OnChangeAmount(textbox, product);
$.unblockUI({
onUnblock: function() {
calculateTotal();
}
});
});
$('#<%= this.btnCancel.ClientID %>').click(function (e) {
$.unblockUI({
onUnblock: function(){
$('#overlay').css('display', 'none');
}
});
});
});
</script>
<div id="overlay" style="display:none;">
<div class=displaycell>
<asp:TextBox ID="TextBox1" CssClass="Input_Text" runat="server"></asp:TextBox>
</div>
</div>