seems that the browser stops the form from being able to do ANYTHING with it...
one solution, but it seems dirty to me, is to add another form with only a cancel button... kr, guenther -- Günther Wieser creative-it Guglgasse 6/1/11/1 A-1110 Wien Austria http://www.creative-it.com -----Original Message----- From: Derrick Koes [mailto:[EMAIL PROTECTED] Sent: Monday, April 11, 2005 10:42 PM To: [EMAIL PROTECTED] Subject: html:cancel question I have a function to disable buttons onsubmit because I don't want the user to keep clicking, especially for long running actions. However, this seems to interfere when the button is an html:cancel, which is a type of submit. It seems to ignore the correct behavior of cancelling and attempts to do a validated submit. What do I need to do to disable buttons AND get cancel to work properly? function disable(form) { var buttons = form.getElementsByTagName("input"); for (i = 0; i < buttons.length; i++) { if (buttons[i].type == "button" || buttons[i].type == "reset" || buttons[i].type == "submit") { buttons[i].disabled = true; } } return true; } Thanks, Derrick --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]