I have a JS script that loaders progress when textChanged event is fired.
This works great.
However, I have an updatePanel that makes the progress bar work.
The issue is that the updatePanel disables the popover in that when clicked, it does nothing.
Without the updatePanel, the popover works just fine.
Secondly, the page is designed in such that if the emPID that user enters into the textChanged event already exist, the entire is disabled by design.
When you move the updatePanel outside the popover, the screen screen is no longer disabled.
Any ideas how to work around this?
I hope I have explained it well.
//Markup:
<body><form id="form1" runat="server"><asp:ScriptManager ID="scriptmanager1" runat="server"></asp:ScriptManager><script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
function BeginRequestHandler(sender, args) {
var state = document.getElementById('loadingdiv').style.display;
if (state == 'block') {
document.getElementById('loadingdiv').style.display = 'none';
} else {
document.getElementById('loadingdiv').style.display = 'block';
}
args.get_postBackElement().disabled = true;
}
</script><div><asp:UpdatePanel ID="PnlUsrDetails" runat="server"><ContentTemplate><table><tr><td>
UserName:
</td><td><asp:TextBox ID="txtUsername" runat="server" AutoPostBack="true" ontextchanged="txtUsername_TextChanged"/></td><td><div id="checkusername" runat="server" Visible="false"><asp:Image ID="imgstatus" runat="server" Width="17px" Height="17px"/><asp:Label ID="lblStatus" runat="server"></asp:Label></div></td></tr></table><div class="waitingdiv" id="loadingdiv" style="display:none; margin-left:5.3em"><img src="LoadingImage.gif" alt="Loading" />Please wait...</div>
...
...<button type="button" class="btn btn-info" data-toggle="popover" title=" Definition" data-trigger="focus" data-content="Definition goes here."><span class="glyphicon glyphicon-question-sign" style="color:#ffffff"></span></button><br />
...
...</ContentTemplate></asp:UpdatePanel></div>//VB:
Protected Sub txtEmpID_TextChanged(sender As Object, e As EventArgs) Handles txtEmpID.TextChanged
If Not String.IsNullOrEmpty(txtEmpID.Text) Then
Dim Conn As SqlConnection
'Read in connection String
Conn = New SqlConnection(ConfigurationManager.ConnectionStrings("constring").ConnectionString)
Conn.Open()
Dim cmd As New SqlCommand("ValidateEmpID", Conn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("@empID", txtEmpID.Text)
Dim dr As SqlDataReader = cmd.ExecuteReader()
If dr.HasRows Then
'Employee exists'
dr.Read()
checkusername.Visible = True
dprocessed.Visible = True
If dr("previousYear").ToString() = "1" Then
imgstatus.ImageUrl = "images/NotAvailable.jpg"
lblStatus.Text = "Please verify your information for accuracy. Then complete rest of the form."
lblStatus.ForeColor = System.Drawing.Color.Red
System.Threading.Thread.Sleep(100)
txteName.Text = dr("employeeName").ToString()
txttitle.Text = dr("empTitle").ToString()
txtemail.Text = dr("email").ToString()
txtEmpID.Text = dr("empID").ToString()
ElseIf dr("thisYear").ToString() = "1" Then
imgstatus.ImageUrl = "images/NotAvailable.jpg"
lblStatus.Text = "You have already completed this Disclosure form. Please close the form. If you feel there is a mistake, please contact Clerk to the CEO and BOC at 404-XXX-XXXX"
lblStatus.ForeColor = System.Drawing.Color.Red
System.Threading.Thread.Sleep(100)
txteName.Text = dr("employeeName").ToString()
txttitle.Text = dr("empTitle").ToString()
txtemail.Text = dr("email").ToString()
txtEmpID.Text = dr("empID").ToString()
txteName.Enabled = False
txttitle.Enabled = False
txtemail.Enabled = False
txtEmpID.Enabled = False
GridPanels.Enabled = False
dprocessed.Visible = True
Else
'not this year, nor the previous year'
End If
Else
checkusername.Visible = True
dprocessed.Visible = True
imgstatus.ImageUrl = "images/Icon_Available.gif"
lblStatus.Text = "Proceed to complete entire form"
lblStatus.ForeColor = System.Drawing.Color.Red
System.Threading.Thread.Sleep(100)
txteName.Text = ""
txttitle.Text = ""
txtemail.Text = ""
End If
Else
checkusername.Visible = False
End If
End SubThanks in advance