I'm using the latest ajax/asp framework (1.0) and I'm seeing the same issue. On random page reloads (so far as I can make out), I get the script error:
"this.get_element().style' is null or not an object"
...the page contains 3 update panels and an updateProgress control as follows:
...removing the updateProgress control alleviates the error. The control is in a table which has a css style applied to it. The whole thing is in a relatively simple aspx page.
The tablecell marked "resultsCell" is referenced in the code-behind. With every page-load a datagrid is computed and then added to this cell (yes, I know, this is horrible). My guess is that this is what is causing problems, but I haven't confirmed that
yet.
The error occurs in the function "Sys$UI$_UpdateProgress$_startRequest()"
It fails on : " this.get_element().style.display = 'block';"
function Sys$UI$_UpdateProgress$_startRequest() {
if (this._pageRequestManager.get_isInAsyncPostBack()) {
if (this._dynamicLayout) this.get_element().style.display = 'block';
else this.get_element().style.visibility = 'visible';
}
this._timerCookie = null;
}
I have the same problem in the same function..When I removed UpdateProgress - everything is OK...Will be there any solution about the UpdateProgress because it's a good functionality ?
I'm not sure if this will help. I just ran into the same problem. I was able to work around it by placing the updateprogress control outside the updatepanel.
I've found this tends to be the solution with some of the ajax controls. The problem it seems is that the scripts and controls don't always get written at the appropriate times, especially when they are within an updatepanel.
<div>I had the same problem when the UpdatePanel content was updating really fast and i constantly repeated clicking the update button</div> <div>Changing the DisplayAfter property to 50 solved it:</div> <div> </div> <div><asp:UpdateProgress runat="server"
DisplayAfter="50" ID="UpdatePanel1Progress" AssociatedUpdatePanelID="UpdatePanel1"></div>
AndrewSeven
Contributor
2184 Points
437 Posts
'this.get_element().style' is null or not an object
Jan 26, 2007 08:01 PM|LINK
I've been getting this error message fairly often.
A page will work normaly for a while, but eventualy I get the error: 'this.get_element().style' is null or not an object
Once I get the error it seems to happen most of the time.
It seems like it might be from the update progress control.
Any ideas?
-A
Garbin
Contributor
7428 Points
1507 Posts
ASPInsiders
Re: 'this.get_element().style' is null or not an object
Jan 26, 2007 08:25 PM|LINK
Hi,
does the error disappear if you remove the UpdateProgress? Could you post the code for your UpdateProgress template?
AndrewSeven
Contributor
2184 Points
437 Posts
Re: 'this.get_element().style' is null or not an object
Jan 26, 2007 08:35 PM|LINK
I'll try removing it next time it happens.
This control is in a user control that is in a materpage.
<atlas:UpdateProgress ID="UpdateProgress1" runat="server"> <ProgressTemplate> <img id="Img1" style="position:relative;top:2px" alt="..." runat="server" src="~/ClientResources/images/loading.gif" /> </ProgressTemplate> </atlas:UpdateProgress>bitfled
Member
22 Points
9 Posts
Re: 'this.get_element().style' is null or not an object
Jan 29, 2007 11:32 AM|LINK
Hi,
I'm using the latest ajax/asp framework (1.0) and I'm seeing the same issue. On random page reloads (so far as I can make out), I get the script error:
"this.get_element().style' is null or not an object"
...the page contains 3 update panels and an updateProgress control as follows:
...removing the updateProgress control alleviates the error. The control is in a table which has a css style applied to it. The whole thing is in a relatively simple aspx page.Garbin
Contributor
7428 Points
1507 Posts
ASPInsiders
Re: 'this.get_element().style' is null or not an object
Jan 29, 2007 11:44 AM|LINK
Hi,
since the page is simple, could you post its code? Are you using any extenders or explictily instantiating client components in the page?
bitfled
Member
22 Points
9 Posts
Re: 'this.get_element().style' is null or not an object
Jan 31, 2007 05:39 PM|LINK
Hey,
Sorry, I can't post the full thing. However, I can post what I think is the most problematic piece:
<asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate> <table id="resultTable" runat="server"> <tr> <td class="groupPopupHeading">Results:</td> </tr> <tr> <td id="resultsCell" runat="server" ></td> </tr> </table> </ContentTemplate> </asp:UpdatePanel>The tablecell marked "resultsCell" is referenced in the code-behind. With every page-load a datagrid is computed and then added to this cell (yes, I know, this is horrible). My guess is that this is what is causing problems, but I haven't confirmed that yet.AndrewSeven
Contributor
2184 Points
437 Posts
Re: 'this.get_element().style' is null or not an object
Jan 31, 2007 08:02 PM|LINK
The error occurs in the function "Sys$UI$_UpdateProgress$_startRequest()"
It fails on : " this.get_element().style.display = 'block';"
function Sys$UI$_UpdateProgress$_startRequest() {
if (this._pageRequestManager.get_isInAsyncPostBack()) {
if (this._dynamicLayout) this.get_element().style.display = 'block';
else this.get_element().style.visibility = 'visible';
}
this._timerCookie = null;
}
xact
Member
44 Points
23 Posts
Re: 'this.get_element().style' is null or not an object
Feb 02, 2007 09:40 AM|LINK
I have the same problem in the same function..When I removed UpdateProgress - everything is OK...Will be there any solution about the UpdateProgress because it's a good functionality ?
arystrom
Member
32 Points
24 Posts
Re: 'this.get_element().style' is null or not an object
Feb 07, 2007 02:38 PM|LINK
I'm not sure if this will help. I just ran into the same problem. I was able to work around it by placing the updateprogress control outside the updatepanel.
<asp:UpdateProgress runat="server" ID="UpdatePanel1Progress" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
......
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
<ContentTemplate>
....
</ContentTemplate>
</asp:UpdatePanel>
I've found this tends to be the solution with some of the ajax controls. The problem it seems is that the scripts and controls don't always get written at the appropriate times, especially when they are within an updatepanel.
aladdinos
Member
2 Points
1 Post
Re: 'this.get_element().style' is null or not an object
Feb 14, 2007 05:12 AM|LINK