JS runtime error in doPostBack with control:control form ID

Discussion in 'ASP .Net' started by Matt Petteys, Aug 14, 2003.

  1. Matt Petteys

    Matt Petteys Guest

    I'm using 1.1 framework and IE 6.0. A form within a user control
    generates the following doPostBack method. The control ID of the form
    is not a valid javascript variable name, ie
    UserProjectDataEntry1:EnterPeriodTime. When the page is loaded, I get a
    runtime error when it parses the following line.

    theform = document.UserProjectDataEntry1:EnterPeriodTime;

    This used to work on the 1.0 framework. Any ideas?

    function __doPostBack(eventTarget, eventArgument) {
    var theform;
    if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
    theform = document.forms["UserProjectDataEntry1:EnterPeriodTime"];
    }
    else {
    theform = document.UserProjectDataEntry1:EnterPeriodTime;
    }
    theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
    theform.__EVENTARGUMENT.value = eventArgument;
    theform.submit();
    }
     
    Matt Petteys, Aug 14, 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. Timothy Kelley

    calling doPostBack not working

    Timothy Kelley, Jul 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    764
  2. Johno

    doPostBack client-side function

    Johno, Jul 18, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    7,803
    Johno
    Jul 21, 2003
  3. tfs

    doPostBack error

    tfs, Jun 28, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    656
  4. Marko Vuksanovic

    Problem with FileUpload control and doPostback

    Marko Vuksanovic, Jun 30, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    7,572
    =?Utf-8?B?c2FyYQ==?=
    Jul 2, 2006
  5. Koi

    Error in doPostBack function for Calendar control

    Koi, Apr 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    279
Loading...

Share This Page