Justin Cooney
Web Development Tips and Examples
Category: JavaScript
-
To prevent forms from being submitted more than once I sometimes like to add a simple JavaScript function to the Submit button that disables the button when it is clicked. This does not provide a complete guarantee that the data is not sent twice, but it is effective at reducing the risk of multiple submissions.…
-
Today I was working on a maintenance Web page that triggers a SQL Server stored procedure. This stored procedure can either run quite quickly, or it can take in excess of seven minutes to finish. So in order to let the user know that the process is executing in the background I added a small…
-
I sometimes find the need to dynamically enable or disable form elements especially since I often use ASP.NET webforms. For this purpose I find that the default HTML attributes are not sufficient. Specifically, the HTML DISABLED and READONLY element attributes do not work as one would want a disabled form field to actually work. In…