Problem w/ disabling buttons after onclick on clientside

Discussion in 'ASP .Net' started by Michael Groeger, Jan 11, 2006.

  1. Hi all,

    I want to disable a button after it's clicked on the clients side, so that
    this cannot be clicked twice. I tried this with adding the "onclick"
    attribute to the button and disable the button then in javascript. Then I
    tried it using Page.RegisterOnSubmitStatement(), but when I then click the
    button the Click event is not fired on server side.

    Any ideas?

    Regards,
    Michael
     
    Michael Groeger, Jan 11, 2006
    #1
    1. Advertising

  2. Michael,

    I have a javascript that does this. It's contained within a Javascript
    component that I give away for free, including source code, on my website.
    You may see a demo of this particular script and the others contained in the
    component here: http://www.aboutfortunate.com?page=javascriptdemo.

    The script goes a bit further by calling the .Net validation routines before
    it disables the button so that if a page isn't valid the user doesn't wind
    up stuck on the page. The downloadable source code is for VS 2003 .NET 1.1
    (I haven't had time to upgrade it to 2.0 yet but am hoping to soon). But
    even if you just want to use the one script or need to upgrade it you'll be
    able to use the source code as an example to go by.

    --
    Sincerely,

    S. Justin Gengo, MCP
    Web Developer / Programmer

    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzsche
    "Michael Groeger" <> wrote in message
    news:%23%...
    > Hi all,
    >
    > I want to disable a button after it's clicked on the clients side, so that
    > this cannot be clicked twice. I tried this with adding the "onclick"
    > attribute to the button and disable the button then in javascript. Then I
    > tried it using Page.RegisterOnSubmitStatement(), but when I then click the
    > button the Click event is not fired on server side.
    >
    > Any ideas?
    >
    > Regards,
    > Michael
    >
    >
     
    S. Justin Gengo, Jan 11, 2006
    #2
    1. Advertising

  3. Hi,

    thanks for your reply. I think it's not exactly what I require. But I am
    still evaluating it.

    Regards,
    Michael

    "S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> schrieb im
    Newsbeitrag news:#...
    > Michael,
    >
    > I have a javascript that does this. It's contained within a Javascript
    > component that I give away for free, including source code, on my website.
    > You may see a demo of this particular script and the others contained in

    the
    > component here: http://www.aboutfortunate.com?page=javascriptdemo.
    >
    > The script goes a bit further by calling the .Net validation routines

    before
    > it disables the button so that if a page isn't valid the user doesn't wind
    > up stuck on the page. The downloadable source code is for VS 2003 .NET 1.1
    > (I haven't had time to upgrade it to 2.0 yet but am hoping to soon). But
    > even if you just want to use the one script or need to upgrade it you'll

    be
    > able to use the source code as an example to go by.
    >
    > --
    > Sincerely,
    >
    > S. Justin Gengo, MCP
    > Web Developer / Programmer
    >
    > www.aboutfortunate.com
    >
    > "Out of chaos comes order."
    > Nietzsche
    > "Michael Groeger" <> wrote in message
    > news:%23%...
    > > Hi all,
    > >
    > > I want to disable a button after it's clicked on the clients side, so

    that
    > > this cannot be clicked twice. I tried this with adding the "onclick"
    > > attribute to the button and disable the button then in javascript. Then

    I
    > > tried it using Page.RegisterOnSubmitStatement(), but when I then click

    the
    > > button the Click event is not fired on server side.
    > >
    > > Any ideas?
    > >
    > > Regards,
    > > Michael
    > >
    > >

    >
    >
     
    Michael Groeger, Jan 20, 2006
    #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. Lamine Darbouche
    Replies:
    1
    Views:
    485
    Johannes Hammersen
    Jun 29, 2005
  2. leggolas
    Replies:
    3
    Views:
    28,174
    leggolas
    Mar 22, 2005
  3. PK9
    Replies:
    1
    Views:
    330
  4. Replies:
    20
    Views:
    208
  5. Steve

    Disabling onclick (using Spry)

    Steve, Dec 21, 2006, in forum: Javascript
    Replies:
    6
    Views:
    160
    -Lost
    Dec 22, 2006
Loading...

Share This Page