autopostback code causes error -Help!

Discussion in 'ASP .Net' started by Nervous Rex, Nov 18, 2003.

  1. Nervous Rex

    Nervous Rex Guest

    I have a couple checkboxes on my form, I need them to
    fire the checkchanged event when they are clicked. From
    what I understand, the only way to do this is with
    autopostback set to TRUE.


    When I do this, the code the control adds to the page
    causes an error

    "Microsoft JScript runtime error: Object doesn't support
    this property or method"


    Here is the code it adds, note the line that errors


    <script language="javascript">
    <!--
    function __doPostBack(eventTarget, eventArgument)
    {
    var theform;
    if (window.navigator.appName.toLowerCase
    ().indexOf("netscape") > -1) {
    theform = document.forms["Form1"];
    }
    else {
    theform = document.Form1;
    }
    theform.__EVENTTARGET.value =
    eventTarget.split("$").join(":");
    theform.__EVENTARGUMENT.value =
    eventArgument;
    theform.submit(); <======ERRORS HERE!!!
    }
    // -->
    </script>



    My Specs:
    VS.net 2003
    v1.1 framework



    Any help is appreciated!!

    NRex
     
    Nervous Rex, Nov 18, 2003
    #1
    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. Eduardo M?ndez
    Replies:
    4
    Views:
    493
    Eduardo M?ndez
    Oct 25, 2003
  2. Xavier Osa
    Replies:
    0
    Views:
    645
    Xavier Osa
    Jan 9, 2004
  3. Jonathan
    Replies:
    0
    Views:
    1,324
    Jonathan
    Jun 14, 2006
  4. Bishop
    Replies:
    1
    Views:
    800
    Bishop
    Feb 24, 2007
  5. Coach

    AutoPostBack causes script error

    Coach, Sep 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    153
    PJChan
    Oct 20, 2005
Loading...

Share This Page