Daniel said:
Hello,
on the website
www.oliver.clarehn-baeren.de/index.php it is necessary
that the Return Key isn't used to send the form. The user must click
on the "Ja" Button. In other ways the PHP Script does'nt work
probably. Can anyone tell, how I can deactivate the return key?
Thank you
Daniel Pomrehn
Dont know why you would..... but any way, this may work for you....
Firstly, you need ne understand that the first <input> in a <form> that is a
'submit' type, will be the one that 'catches' the return key when on a field
(<input type of text>).
What you may be able to do, is to paint yourself another input submit
earlier in the form (before the original button), giving it a different
name, and when submitted, simply do not do what the other button would
normally do.
like this.....
<form action="script.php">
<input name=mytextfield" type="text">
<input name="dummybutton" type="submit" value="">
<input name="realbutton" type="submit" value="the real one">
</form>
.... in the above example, the button named "dummybutton" will catch the
'return' key because it is painted first in the <form>
....now, you have the option to either put a javascript in the button to say
something like "onclick, piss off", or you could have something in your
script .php file that says something like if (isset($dummybutton){ echo
"piss off";}