I've been getting this weird error from past couple of days. I've nothing to do with the resource.axd file. And hence somehow i'm not being able to understand how to fix this problem.
To give a background, I've a Search page, which has 2 calendar (these are infragisitc controls) control and search button. when i click on search button without changing calendar dates, my page works fine.
After hitting search, if i change calendar dates, it still works fine. Problem comes when i come to Search page and first thing i do is change calendar date, then i hit search button.
On click of search button, i'm calling progress bar user control, attached is the code of Progress bar control.
------------------------------------------------------------------------------------------------------------------------------------------------------------
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
<%
@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxtoolkit" %>
<
style type="text/css">.modalBackground
{
background-color: Gray;
filter: alpha(opacity=50); opacity: 0.50;
}
</style>
<
script type="text/javascript" language="javascript">
var ModalProgress ='<%= ModalProgress.ClientID %>'; </script>
<
script type="text/javascript" language="javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginReq);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endReq);
//Create buffer to be used for JAWS - 508 compliance.
//prepareBuffer();
function beginReq(sender, args){
// shows the Popup
$find(ModalProgress).show();
}
function endReq(sender, args)
{
// shows the Popup
$find(ModalProgress).hide();
//updateBuffer();
}
function prepareBuffer()
{
var objNew = document.createElement('p');
var objHidden = document.createElement('input');objHidden.setAttribute('type', 'hidden');
objHidden.setAttribute(
'value', '1');objHidden.setAttribute('id', 'virtualbufferupdate');objHidden.setAttribute('name', 'virtualbufferupdate');
objNew.appendChild(objHidden);
document.body.appendChild(objNew);
}
function updateBuffer()
{
var objHidden = document.getElementById('virtualbufferupdate');if (objHidden)
{
if (objHidden.getAttribute('value') == '1')objHidden.setAttribute('value', '0');
elseobjHidden.setAttribute('value', '1');
}
}
</script>
<
asp:Panel ID="panelUpdateProgress" runat="server" CssClass="updateProgress">
<asp:UpdateProgress ID="UpdateProg1" DisplayAfter="0" runat="server" >
<ProgressTemplate>
<asp:Image runat="server" ID="imgLoading" ImageUrl="~/Images/loading.gif" />
</ProgressTemplate></asp:UpdateProgress>
</
asp:Panel>
<
ajaxtoolkit:ModalPopupExtender ID="ModalProgress" runat="server" TargetControlID="panelUpdateProgress" RepositionMode="RepositionOnWindowResizeAndScroll"
BackgroundCssClass="modalBackground" PopupControlID="panelUpdateProgress" />
------------------------------------------------------------------------------------------------------------------------------------------------------------
Surprisingly, I'm uable to re-produce this error in my Dev and QA environment. My Prod environment throws this Javascript error however. I've reinstalled ASPAJAXSetup on Prod but no reuslts.
I'm using Infragistic control library. I've also re-installed infragisitc library too. Can this be because of this?
Please help, My app is in production and users are not being able to do anything.
Thanks in advance.
Samit
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sys.UI.DomElement.removeCssClass = function Sys$UI$DomElement$removeCssClass(element, className) {
/// <param name="element" domElement="true"></param>
/// <param name="className" type="String"></param>
var e = Function._validateParams(arguments, [
{name: "element", domElement: true},
{name: "className", type: String}
]);
if (e) throw e;
var currentClassName = ' ' + element.className + ' ';
var index = currentClassName.indexOf(' ' + className + ' ');
if (index >= 0) {
element.className = (currentClassName.substr(0, index) + ' ' +
currentClassName.substring(index + className.length + 1, currentClassName.length)).trim();
}
}