Can anyone please tell me how to set up a form so that return "hits" a button that is NOT of type submit.
The reason for this is that I run a JavaScript function instead of submitting the form straight away to validate the input. If I use a submit button the form gets submitted when you press return regardless of the JS function, if I use a button the return key does not hit the button.
My validate function is:
The two buttons I have tried are:
This submits the form on pressing return without going through the validate function (although the function is run as well).
This works as expected but is not hit when return is pressed.
NOTE - on Click entered with a space as the forum wouldnt allow the proper version.
Any ideas?
Cheers [ January 13, 2005: Message edited by: Nick Leaver ]