Enable a button via javascript with PostBackUrl set -> the postbackurl doesn't work

Discussion in 'ASP .Net' started by Fabio Mastria, Mar 3, 2008.

  1. Why a button enabled via javascript don't post to a page to the url set in
    PostBackUrl property?

    thank you all
    Fabio
     
    Fabio Mastria, Mar 3, 2008
    #1
    1. Advertising

  2. Fabio Mastria

    bruce barker Guest

    RE: Enable a button via javascript with PostBackUrl set -> the postbac

    dpends on how you are enabling the control. if you are using a PostbackUrl,
    this is done in javascript by setting the button's onclick event to
    WebForm_DoPostBackWithOptions. one of the args is the postback url. this
    function updates the action, does a form submit and cancels the buttons event.

    view source to see what javascript is on the button's onclick (maybe you
    defined an action that prevents the proper behavior).


    -- bruce (sqlwork.com)


    "Fabio Mastria" wrote:

    > Why a button enabled via javascript don't post to a page to the url set in
    > PostBackUrl property?
    >
    > thank you all
    > Fabio
    >
    >
     
    bruce barker, Mar 3, 2008
    #2
    1. Advertising

  3. Fabio Mastria

    rose Guest

    Re: Enable a button via javascript with PostBackUrl set -> thepostbackurl doesn't work

    It might be because in the javascript code, you have set the return
    statement to false. i.e. return false;
    If it is so, the button will not postback
     
    rose, Mar 4, 2008
    #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. Chris Lane
    Replies:
    4
    Views:
    11,236
    Chris Lane
    Nov 17, 2003
  2. Patrick
    Replies:
    1
    Views:
    660
  3. Replies:
    0
    Views:
    516
  4. Paul D. Fox

    Enable/Disable a control via JavaScript?

    Paul D. Fox, Apr 25, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    116
    Paul D. Fox
    Apr 25, 2005
  5. Bear Lin

    Enable/Disable a control via JavaScript?

    Bear Lin, May 23, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    114
    Bear Lin
    May 23, 2005
Loading...

Share This Page