Ajax Error?

Discussion in 'ASP .Net' started by Mike Collins, Jul 16, 2008.

  1. Mike Collins

    Mike Collins Guest

    The following line of code gives me an error. I'm guessing it is an Ajax
    related error.

    this.get_element().style.display = 'block';

    This is the function that the line of code is in when it breaks.

    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;
    }

    The error is: Microsoft JScript runtime error: this.getElement().style is
    null or not an object.

    I have no idea how this is happening. Can someone please help me with this
    error?
     
    Mike Collins, Jul 16, 2008
    #1
    1. Advertising

  2. On Wed, 16 Jul 2008 10:45:01 -0700, Mike Collins
    <> wrote:

    >The following line of code gives me an error. I'm guessing it is an Ajax
    >related error.
    >
    >this.get_element().style.display = 'block';
    >
    >This is the function that the line of code is in when it breaks.
    >
    >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;
    >}
    >
    >The error is: Microsoft JScript runtime error: this.getElement().style is
    >null or not an object.
    >
    >I have no idea how this is happening. Can someone please help me with this
    >error?


    I'm not very familiar with JScript but my javascript expreience makes
    me think the method get_element takes an argument, probably a string
    which is the name of the element to be returned.

    regards
    A.G.
     
    Registered User, Jul 16, 2008
    #2
    1. Advertising

  3. Mike Collins

    Mike Collins Guest

    Not sure I'm following what you said. This showed up as a result of an Ajax
    operation I am doing, but I do not know what or how?

    "Registered User" wrote:

    > On Wed, 16 Jul 2008 10:45:01 -0700, Mike Collins
    > <> wrote:
    >
    > >The following line of code gives me an error. I'm guessing it is an Ajax
    > >related error.
    > >
    > >this.get_element().style.display = 'block';
    > >
    > >This is the function that the line of code is in when it breaks.
    > >
    > >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;
    > >}
    > >
    > >The error is: Microsoft JScript runtime error: this.getElement().style is
    > >null or not an object.
    > >
    > >I have no idea how this is happening. Can someone please help me with this
    > >error?

    >
    > I'm not very familiar with JScript but my javascript expreience makes
    > me think the method get_element takes an argument, probably a string
    > which is the name of the element to be returned.
    >
    > regards
    > A.G.
    >
     
    Mike Collins, Jul 16, 2008
    #3
  4. Mike Collins

    bruce barker Guest

    get_element() is used to get the dom element the behavior is attached to. the
    error displayed means the dom object does not have a style property, so its
    not a true dom object.

    this means that you UpdateProgress control is setup wrong. either you are
    missing the template, or gave it a bad AssociatedUpdatePanelID

    -- bruce (sqlwork.com)


    "Mike Collins" wrote:

    > The following line of code gives me an error. I'm guessing it is an Ajax
    > related error.
    >
    > this.get_element().style.display = 'block';
    >
    > This is the function that the line of code is in when it breaks.
    >
    > 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;
    > }
    >
    > The error is: Microsoft JScript runtime error: this.getElement().style is
    > null or not an object.
    >
    > I have no idea how this is happening. Can someone please help me with this
    > error?
     
    bruce barker, Jul 16, 2008
    #4
  5. Mike Collins

    Mike Collins Guest

    Thanks, that did it.

    "bruce barker" wrote:

    > get_element() is used to get the dom element the behavior is attached to. the
    > error displayed means the dom object does not have a style property, so its
    > not a true dom object.
    >
    > this means that you UpdateProgress control is setup wrong. either you are
    > missing the template, or gave it a bad AssociatedUpdatePanelID
    >
    > -- bruce (sqlwork.com)
    >
    >
    > "Mike Collins" wrote:
    >
    > > The following line of code gives me an error. I'm guessing it is an Ajax
    > > related error.
    > >
    > > this.get_element().style.display = 'block';
    > >
    > > This is the function that the line of code is in when it breaks.
    > >
    > > 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;
    > > }
    > >
    > > The error is: Microsoft JScript runtime error: this.getElement().style is
    > > null or not an object.
    > >
    > > I have no idea how this is happening. Can someone please help me with this
    > > error?
     
    Mike Collins, Jul 16, 2008
    #5
  6. Mike Collins

    Mashudu Guest

    I am currently experiencing the same issue. I did remove the UpdateProgress
    from the UpdatePanel and put it outseide but the problem still persue. Do you
    have any suggestion?

    Thanks in advanced

    "Mike Collins" wrote:

    > Thanks, that did it.
    >
    > "bruce barker" wrote:
    >
    > > get_element() is used to get the dom element the behavior is attached to. the
    > > error displayed means the dom object does not have a style property, so its
    > > not a true dom object.
    > >
    > > this means that you UpdateProgress control is setup wrong. either you are
    > > missing the template, or gave it a bad AssociatedUpdatePanelID
    > >
    > > -- bruce (sqlwork.com)
    > >
    > >
    > > "Mike Collins" wrote:
    > >
    > > > The following line of code gives me an error. I'm guessing it is an Ajax
    > > > related error.
    > > >
    > > > this.get_element().style.display = 'block';
    > > >
    > > > This is the function that the line of code is in when it breaks.
    > > >
    > > > 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;
    > > > }
    > > >
    > > > The error is: Microsoft JScript runtime error: this.getElement().style is
    > > > null or not an object.
    > > >
    > > > I have no idea how this is happening. Can someone please help me with this
    > > > error?
     
    Mashudu, Nov 11, 2008
    #6
  7. its only becus of update panel?

    i m sure

    delete all update panel (Inners nd Outers). and then check.......

    "Mashudu" wrote:

    > I am currently experiencing the same issue. I did remove the UpdateProgress
    > from the UpdatePanel and put it outseide but the problem still persue. Do you
    > have any suggestion?
    >
    > Thanks in advanced
    >
    > "Mike Collins" wrote:
    >
    > > Thanks, that did it.
    > >
    > > "bruce barker" wrote:
    > >
    > > > get_element() is used to get the dom element the behavior is attached to. the
    > > > error displayed means the dom object does not have a style property, so its
    > > > not a true dom object.
    > > >
    > > > this means that you UpdateProgress control is setup wrong. either you are
    > > > missing the template, or gave it a bad AssociatedUpdatePanelID
    > > >
    > > > -- bruce (sqlwork.com)
    > > >
    > > >
    > > > "Mike Collins" wrote:
    > > >
    > > > > The following line of code gives me an error. I'm guessing it is an Ajax
    > > > > related error.
    > > > >
    > > > > this.get_element().style.display = 'block';
    > > > >
    > > > > This is the function that the line of code is in when it breaks.
    > > > >
    > > > > 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;
    > > > > }
    > > > >
    > > > > The error is: Microsoft JScript runtime error: this.getElement().style is
    > > > > null or not an object.
    > > > >
    > > > > I have no idea how this is happening. Can someone please help me with this
    > > > > error?
     
    Manish Vashistha, Jun 24, 2010
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    20
    Views:
    1,942
    d1srupt3r
    Mar 31, 2008
  2. darrel

    beginner AJAX questions (AJAX.net)

    darrel, Apr 27, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    2,477
    Flinky Wisty Pomm
    Apr 28, 2006
  3. jobs
    Replies:
    0
    Views:
    386
  4. minnie
    Replies:
    1
    Views:
    761
    Andrew Thompson
    Dec 13, 2006
  5. Tony K
    Replies:
    2
    Views:
    1,106
    Tony K
    May 4, 2007
Loading...

Share This Page