__doPostback

Discussion in 'ASP .Net' started by Garry Weston, Jun 10, 2005.

  1. Garry Weston

    Garry Weston Guest

    I have several forms in a web application the allow the user to hit the
    press the enter button and cause a postback.
    I have the following javascript handling the key press if the key code is
    13:

    /* this function handles the actual submission of the search criteria */
    function disableSubmit(){
    // need to disable the submit button
    document.getElementById("btnSubmit").value = "Please Wait ....";
    document.getElementById("btnSubmit").disabled = true;

    // force a postback with the btnDoSubmit as the caller
    __doPostBack('btnDoSubmit','');

    }

    My problem is, that on one page this code does not work.
    The olny difference between the forms is the way they are called via a hyper
    link. This form has a target of _blank.
    I keep getting the following error.
    Microsoft JScript runtime error: Object expected

    Any help would be appreciated.

    Thanks
    Garry Weston, Jun 10, 2005
    #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. paul reed

    Wierd Behavior of __doPostBack

    paul reed, Jul 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    549
    Bassel Tabbara [MSFT]
    Jul 8, 2003
  2. Mike Dunn

    Overriding __doPostBack

    Mike Dunn, Jul 9, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    875
    vMike
    Jul 9, 2003
  3. Hayato Iriumi

    __doPostBack EventArgument

    Hayato Iriumi, Jul 22, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    719
    Hayato Iriumi
    Jul 22, 2003
  4. E
    Replies:
    3
    Views:
    4,210
    John Saunders
    Jul 31, 2003
  5. Steven Livingstone

    __doPostback method with colons problem

    Steven Livingstone, Aug 4, 2003, in forum: ASP .Net
    Replies:
    15
    Views:
    725
    John Saunders
    Aug 28, 2003
Loading...

Share This Page