Error in __doPostBack when installing .Net 1.1 with 1.0

Discussion in 'ASP .Net Web Controls' started by Miguel Figueroa, Oct 21, 2003.

  1. Hi,

    I'm (and I thing a lot of guys are) having problems with
    the __doPostBack javascript function. This due to the
    installation of .Net 1.1 on my pc containing the .Net 1.0
    The project I'm working on it, targets the .Net 1.0 (has
    not been migrated to .Net 1.1).

    Problem description:
    Object expected.
    Code:
    function __doPostBack(eventTarget, eventArgument) {
    var theform;
    if (window.navigator.appName.toLowerCase
    ().indexOf("netscape") > -1) {
    theform = document.forms
    ["Layout:frmLayout"];
    }
    else {
    theform =
    document.Layout:frmLayout;
    }
    theform.__EVENTTARGET.value =
    eventTarget.split("$").join(":");
    theform.__EVENTARGUMENT.value =
    eventArgument;
    theform.submit();
    }


    As you can see the code document.Layout:frmLayout;
    is invalid in JavaScript because of the :frmLayout
     
    Miguel Figueroa, Oct 21, 2003
    #1
    1. Advertising

  2. Hi Miguel,

    This is a well-known bug and its already fixed in a patch release by
    Microsoft, sorry I dont have the link handy but you should not have much
    trouble in finding it, just google for it or search microsoft.com

    --
    Victor Garcia Aprea
    Microsoft MVP | ASP.NET
    Looking for insights on ASP.NET? Read my blog:
    http://obies.com/vga/blog.aspx
    To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
    and not by private mail.

    "Miguel Figueroa" <> wrote in message
    news:021001c397ef$ce1c3980$...
    > Hi,
    >
    > I'm (and I thing a lot of guys are) having problems with
    > the __doPostBack javascript function. This due to the
    > installation of .Net 1.1 on my pc containing the .Net 1.0
    > The project I'm working on it, targets the .Net 1.0 (has
    > not been migrated to .Net 1.1).
    >
    > Problem description:
    > Object expected.
    > Code:
    > function __doPostBack(eventTarget, eventArgument) {
    > var theform;
    > if (window.navigator.appName.toLowerCase
    > ().indexOf("netscape") > -1) {
    > theform = document.forms
    > ["Layout:frmLayout"];
    > }
    > else {
    > theform =
    > document.Layout:frmLayout;
    > }
    > theform.__EVENTTARGET.value =
    > eventTarget.split("$").join(":");
    > theform.__EVENTARGUMENT.value =
    > eventArgument;
    > theform.submit();
    > }
    >
    >
    > As you can see the code document.Layout:frmLayout;
    > is invalid in JavaScript because of the :frmLayout
     
    Victor Garcia Aprea [MVP], Oct 23, 2003
    #2
    1. Advertising

  3. Deep problem description, workarounds and patches are here:

    http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=191690

    :)

    Victor Garcia Aprea [MVP] wrote:

    > Hi Miguel,
    >
    > This is a well-known bug and its already fixed in a patch release by
    > Microsoft, sorry I dont have the link handy but you should not have much
    > trouble in finding it, just google for it or search microsoft.com
    >


    --
    Best wishes,
    Kirill Ritvinsky
    www.eaproject.com
     
    Kirill Ritvinsky, Nov 10, 2003
    #3
    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. E
    Replies:
    3
    Views:
    4,237
    John Saunders
    Jul 31, 2003
  2. Nikhil Patel

    javascript:__doPostBack error

    Nikhil Patel, Feb 26, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    8,077
    Scott M.
    Feb 26, 2004
  3. =?Utf-8?B?TGFuY2UgQWhsYmVyZw==?=

    ASP.NET 2.0 Page with LinkButton & __doPostBack client side script missing

    =?Utf-8?B?TGFuY2UgQWhsYmVyZw==?=, May 6, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    995
    =?Utf-8?B?TGFuY2UgQWhsYmVyZw==?=
    May 6, 2004
  4. Murray Patrick via DotNetMonster.com

    __doPostBack Error -- Javascript

    Murray Patrick via DotNetMonster.com, Feb 11, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,707
    Murray Patrick via DotNetMonster.com
    Feb 11, 2005
  5. Mike Owen

    Javascript error is stopping __doPostBack working

    Mike Owen, Jun 15, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    475
    Mike Owen
    Jun 16, 2004
Loading...

Share This Page