Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Problem w/ disabling buttons after onclick on clientside

Reply
Thread Tools

Problem w/ disabling buttons after onclick on clientside

 
 
Michael Groeger
Guest
Posts: n/a
 
      01-11-2006
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


 
Reply With Quote
 
 
 
 
S. Justin Gengo
Guest
Posts: n/a
 
      01-11-2006
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" <(E-Mail Removed)> wrote in message
news:%23%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Michael Groeger
Guest
Posts: n/a
 
      01-20-2006
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:#(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%23%(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling onclick (using Spry) Steve Javascript 6 12-22-2006 12:22 AM
void(0) is disabling my onclick event (ie only) ??? seth.m.green@gmail.com Javascript 20 12-22-2005 03:46 PM
Need OnClick ServerSide and ClientSide Event Handler PK9 ASP .Net Web Controls 1 03-07-2005 03:19 AM
Advanced onclick button which disable all other buttons on the document problem KS Java 1 09-12-2003 11:41 AM
Advanced onclick button which disable all other buttons on the document problem KS Javascript 1 09-12-2003 11:40 AM



Advertisments