Forum Moderators: open
<a href='javascript:if( check_form() ) document.formname.submit();'><img src="....">
Either I would like to disable the button "return" by using onclick (which I did not got to work) or to find a way that the javascript checking is used in both cases (pressing button/return).
thanks for your help
You can achieve this by puttin your validation script as being called as an onsubmit on the form tag, then using onKeyPress on your text field(s) and calling a function (returning to be exact) that sniffs for the Enter key being pressed (by using window.event.keyCode for example) and returns false on the form submit.
HTH