[Javascript] Disabling the image submit button -- aspx

Chris Tifer christ at saeweb.com
Thu Nov 13 12:29:33 CST 2003


First thing I would try is:

alert(ProceedButton)

on the line directly before your ProceedButton.disabled = true; statement

See what that returns. If everything is ok, it should say [object] or
something similar. It's possible that there's more than one of these buttons
in the document so referencing getElementById would throw it off a little.

Wouldn't that be ironic since that's the very thing being talked about in
the other thread?

Chris Tifer
http://emailajoke.com


> ----- Original Message ----- 
> From: "Guy Platt" <guy at webbnet.com>
> To: "[JavaScript List]" <javascript at LaTech.edu>
> Sent: Thursday, November 13, 2003 7:00 AM
> Subject: [Javascript] Disabling the image submit button -- aspx
>
>
> > Hi,
> >
> > I'm working with an aspx  imagebutton and want to disable the button
> > after it has been clicked once. I have the following (not working) code.
> >
> > Anyone got experience with aspx  imagebuttons?
> >
> > many thanks
> >    Guy
> >
> >
> >
> > <script LANGUAGE="JavaScript">
> > // var submitted=false
> > function submitonce(theform)
> > {
> >    //  if(submitted){return false}
> >      var ProceedButton = document.getElementById('ImageButton1')
> >      ProceedButton.disabled = true;
> >      //submitted=true;
> >      return (true);
> > }
> > </script>
> > </HEAD>
> >
> > <body>
> >         <form id="billing" method="post" runat="server"
> > onSubmit="return submitonce(this)">
> >
> > .
> > .
> > .
> > <asp:ImageButton Runat='server' ImageUrl="../images/fortsatt.gif"
> > OnClick='SubmitForm' id='ImageButton1' />
> >
> >
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > https://lists.LaTech.edu/mailman/listinfo/javascript
> >
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list