I have seen this done on other sites, except I have no idea how to go about doing it.
I have a form with a box to click on to submit the form, and I want to disable the button once the user clicks on the form, I do not want the user to double click it by accident (as sometimes happens).
Thanks,
-PhillConsider this simple example... it will disable submit button and submit the form, but if the form submission times out then they will have to reload & start over... but I assume you know this...
<html>
<head>
<title>Disable Test</title>
<script type='text/javascript'>
function disMe() {
document.TestMe.cmd.disabled=true;
}
</script>
</head>
<body>
<form Name="TestMe" action="testMe.html" onSubmit="disMe()">
<input type="text" Name="T1"> Whatever<br>
<input type="submit" name="cmd" value="Submit">
</form>
</body>
</html>
If You watch closely enough, the button will disable just before the form submits. It's quick and hard to see, but it does.Perfect, just what I was looking for!
I have a form with a box to click on to submit the form, and I want to disable the button once the user clicks on the form, I do not want the user to double click it by accident (as sometimes happens).
Thanks,
-PhillConsider this simple example... it will disable submit button and submit the form, but if the form submission times out then they will have to reload & start over... but I assume you know this...
<html>
<head>
<title>Disable Test</title>
<script type='text/javascript'>
function disMe() {
document.TestMe.cmd.disabled=true;
}
</script>
</head>
<body>
<form Name="TestMe" action="testMe.html" onSubmit="disMe()">
<input type="text" Name="T1"> Whatever<br>
<input type="submit" name="cmd" value="Submit">
</form>
</body>
</html>
If You watch closely enough, the button will disable just before the form submits. It's quick and hard to see, but it does.Perfect, just what I was looking for!