Jump to content

Disable submit button


Bogey
 Share

Recommended Posts

Hi all, First one question:Does the search option work on this website? I can't get anything to find... :S My problem:I have a form, that has been excecuted, after pressing Submit...After the Submit click I want the button be disabled, but can't get it done... any sollutions?

<FORM enctype='multipart/form-data' action='modules/secure/verkoper_secure_sendToDB.php' method='post'> <INPUT name='submit' type='submit' tabindex='<?php echo $tab;?>' id='buttonsendFillDB' disabled='disabled' title='be active if everything is filled!'/></FORM>

One more thing:I want the button DISABLE, when the button is clicked (by mouse) BUT ALSO when button is hit with ENTER (keyboard) I tried different things, but can't get it done :S

Link to comment
Share on other sites

You need to add an "onsumbit" handler to the <form> element in which you return false in order to prevent the form from being submitted. The most basic (and pretty useless) example of disabling form submission:

<form onsubmit="return false;" ... >

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...