This is a migrated thread and some comments may be shown as answers.

Grey out button when submit

1 Answer 85 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
L
Top achievements
Rank 1
L asked on 09 Oct 2010, 04:43 PM
hi

How do i grey out a button when click upload? thanks

1 Answer, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 12 Oct 2010, 01:22 PM
You can do something like this:

<asp:Button ID="Button1" runat="server" OnClientClick="disableButton();return true;">
</asp:Button>

JavaScript:

function disableButton()
{
   $document.getElementById("<%=Button1.ClientID%>").disabled = true;
}

So pretty much all it does, is that when the button is clicked, it disables itself.

I hope that helps.
Tags
Upload (Obsolete)
Asked by
L
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Share this question
or