Javascript error is stopping __doPostBack working

Discussion in 'ASP .Net Web Controls' started by Mike Owen, Jun 15, 2004.

  1. Mike Owen

    Mike Owen Guest

    Postback suddenly stopped working on my web page, where previous it had been working fine.

    The error message "Expected ';' on line number 380" is shown to occur during page load, which I found by changing the 'SymError' function as below:

    <script language="JavaScript">
    <!--
    function SymError(msg, url, linenumber){
    alert('Error message= '+msg+'\nURL= '+url+'\nLine Number= '+linenumber);
    alert("system error");
    return true;
    }
    window.onerror = SymError;
    //-->
    </script>


    The automatically generated line: theform = document.WebShopProductDetails:_ctl0:form1;

    in the following automatically produced __doPostBack function is producing the error.....anybody got any ideas firstly why the script is being generated with an error, and secondly what the error is as everything looks fine to me?


    <script language="javascript">
    <!--
    function __doPostBack(eventTarget, eventArgument) {
    var theform;
    if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
    theform = document.forms["WebShopProductDetails:_ctl0:form1"];
    }
    else {
    theform = document.WebShopProductDetails:_ctl0:form1;
    alert("gets here!");
    }
    theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
    theform.__EVENTARGUMENT.value = eventArgument;
    theform.submit();
    }
    // -->
    </script>
    Mike Owen, Jun 15, 2004
    #1
    1. Advertising

  2. Mike Owen

    Mike Owen Guest

    I have found the answer to my problem!

    It is a bug in the .Net 1.1 framework code, as in the following article:

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;818803

    But I managed to download and successfully install the fix on my 2000 server from:

    http://support.instantasp.co.uk/shwmessage.aspx?forumid=25&messageid=654

    I hope that this helps others!



    "Mike Owen" wrote:

    > Postback suddenly stopped working on my web page, where previous it had been working fine.
    >
    > The error message "Expected ';' on line number 380" is shown to occur during page load, which I found by changing the 'SymError' function as below:
    >
    > <script language="JavaScript">
    > <!--
    > function SymError(msg, url, linenumber){
    > alert('Error message= '+msg+'\nURL= '+url+'\nLine Number= '+linenumber);
    > alert("system error");
    > return true;
    > }
    > window.onerror = SymError;
    > //-->
    > </script>
    >
    >
    > The automatically generated line: theform = document.WebShopProductDetails:_ctl0:form1;
    >
    > in the following automatically produced __doPostBack function is producing the error.....anybody got any ideas firstly why the script is being generated with an error, and secondly what the error is as everything looks fine to me?
    >
    >
    > <script language="javascript">
    > <!--
    > function __doPostBack(eventTarget, eventArgument) {
    > var theform;
    > if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
    > theform = document.forms["WebShopProductDetails:_ctl0:form1"];
    > }
    > else {
    > theform = document.WebShopProductDetails:_ctl0:form1;
    > alert("gets here!");
    > }
    > theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
    > theform.__EVENTARGUMENT.value = eventArgument;
    > theform.submit();
    > }
    > // -->
    > </script>
    >
    Mike Owen, Jun 16, 2004
    #2
    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. Nikhil Patel

    javascript:__doPostBack error

    Nikhil Patel, Feb 26, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    8,027
    Scott M.
    Feb 26, 2004
  2. Fredrik Elestedt

    __dopostback javascript problem

    Fredrik Elestedt, Apr 22, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    5,819
    John Saunders
    Apr 23, 2004
  3. Murray Patrick via DotNetMonster.com

    __doPostBack Error -- Javascript

    Murray Patrick via DotNetMonster.com, Feb 11, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,678
    Murray Patrick via DotNetMonster.com
    Feb 11, 2005
  4. SteveSu
    Replies:
    2
    Views:
    16,993
    SteveSu
    Nov 8, 2005
  5. =?Utf-8?B?Q2xhcw==?=
    Replies:
    0
    Views:
    1,476
    =?Utf-8?B?Q2xhcw==?=
    Nov 10, 2005
Loading...

Share This Page