On Sep 26, 10:10 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > 1. remove the type=submit button. you need to also use javascript to
> > submit form.
>
> Really?
>
> Try this:
> <form action="#test" method="post">
> <input />
> </form>
>
> 'Enter' works for me in FF (I didnt check on other browsers)
>
> Michael

Yes, you are right. I made a mistake. This solution can only work if
there is password field in the form.

Try this:
<form action="#" method="post" onload="alert('test');return false;">
<input type="text" name="field1" />
<input type="password" name="field2" />
</form>
This form will not respond the enter.

If we remove the password field:
<form action="#" method="post" onload="alert('test');return false;">
<input type="text" name="field1" />
</form>
This form will respond the enter.

or if we add a submit button:
<form action="#" method="post" onload="alert('test');return false;">
<input type="text" name="field1" />
<input type="password" name="field2" />
<input type="submit" name="submit" value="submit" />
</form>
This form will respond the enter too.

These three cases are passed in FF2 and IE6+


Reply via email to