Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('input[type=submit]').click(function() { this.disabled = true; });
- $('form').submit(function() {
- $('input[type=submit]', this).attr("disabled","disabled");
- });
- $('form').submit(function() {
- $(this)
- .find(":submit,:image") // get all the submit buttons
- .attr({ disabled : 'disabled' }) // disable them
- .end() // go back to this form
- .submit(function() { // change the onsubmit to always reject.
- return false;
- })
- ;
- });
- <html>
- <head>
- <script type="text/javascript" src="include/js/prototype.js"></script>
- <script type="text/javascript">
- function handleSubmit()
- {
- $('submit').hide();
- $('progressWheel').show();
- return true;
- }
- </script>
- </head>
- <body>
- <img src="include/images/progress-wheel_lg.gif" id="progressWheel" style="display:none;"/>
- <input type="submit" name="submit" id="submit" value="Submit" onclick="handleSubmit();"/>
- </body>
- </html>
- $('#SubmitButtonID').click(function() { this.disabled = true; });
- function disableSubmit() {
- document.getElementById('btnContinue3').onclick = function() {
- alert('Please only click once on the submit button!'); return false;
- };
- }
Add Comment
Please, Sign In to add comment