I see your point. How 'bout this:
<form name="the_form" action="whatever.php" method="POST">
<input type="submit" value="submit" name="the_button" onClick="disableButton();">
</form>
<script language="javascript">
function disableButton(){
var the_button = document.getElementById("sbutton");
the_button.disabled=true;
the_button.value = 'disabled';
document.the_form.submit();
}
</script>
however, this doesn't cover your enter key being pressed. Yet another option is to capture the form submission:
<form name="the_form" onSubmit="disableButton();">
I'm not 100% on that one but you might wanna check it out.
and yet another is to write two functions, the one that disables the button and then submit's the form and another that captures the enter key press and makes it do nothing.
this only works in netscape 4+ but I'm sure you can find it for IE pretty easily, stw
<script language="javascript">
function readKey(e){
if(e.keyCode == 13){
//do nothing
}
}
document.onKeyPressed = readKey
</script>