Navigation

Search

Categories

On this page

Hiding a Submit Button When Clicked Using Javascript
Open Source Templates
Free Web Site Templates
CSS Style

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 240
This Year: 46
This Month: 3
This Week: 0
Comments: 0

Sign In
Pick a theme:

# Wednesday, January 06, 2010
Wednesday, January 06, 2010 6:57:11 PM (GMT Standard Time, UTC+00:00) ( ASP.NET | HTML | Javascript/AJAX )


 

This is a cool trick which assigns a bit of javascript to a server-side button to hide one button and replace it with another. In this example, the submit button, chkReview, when clicked is hidden from the user and is replaced with another button, btnSaveDisabled, which says “Please wait…Your request is being processed.”

 
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)   
If Not Page.IsPostBack Then
chkReview.OnClientClick = string.Format("javascript:{0}.style.visibility = 'hidden';{0}.style.display  = 'none';{1}.style.visibility = 'visible'", 
chkReview.ClientID, btnSaveDisabled.ClientID) End If End Sub
<asp:Button ID="chkReview" runat="server" onclick="chkSubmitRequest_Click" Text="Submit Request" CssClass="button"  />
<br />
<asp:Button ID="btnSaveDisabled" Enabled="false" runat="server" Text="Please wait...Your request is being processed" 
Style="visibility: hidden;" CssClass="button" />
 
Comments [0] | | # 
# Monday, February 09, 2009
Monday, February 09, 2009 2:28:21 PM (GMT Standard Time, UTC+00:00) ( CSS | HTML )

 

A couple of sources for great, free Web templates for the design-challenged.

http://www.oswd.org/ 

http://www.opendesigns.org/

Comments [0] | | # 
# Friday, May 30, 2008
Friday, May 30, 2008 3:25:44 AM (GMT Daylight Time, UTC+01:00) ( HTML )

My design skills are terrible so I often look for templates or "borrow" other people's design ideas. One of the better sites I've found for templates is http://www.opendesigns.org/

Comments [0] | | # 
# Monday, December 10, 2007
Monday, December 10, 2007 1:13:24 AM (GMT Standard Time, UTC+00:00) ( CSS | HTML )

 

This dumb post is just for my own reference.  This catch-all CSS references uses a font style that I like for all of the most common HTML page elements.

body, input, select, textarea, button {font-family:Verdana, sans-serif; font-size:x-small}
Comments [0] | | #