- From: Clover Andrew <aclover@1value.com>
- Date: Tue, 8 May 2001 12:12:57 +0200
- To: <www-html@w3.org>
Carsten H. Pedersen <chp@visholm.dk> wrote: > How do I specify that the default submit button should > be the *second* one defined? If a form is submitted by an Enter-keypress in a text field, then the submitted form data should include *neither* of the submit-button name/value pairs. If neither value is passed to the server-side script, it should decide itself which of the actions was meant. The problem is that IE4+ will, as you say, return the first submit-button value when Enter is pressed. This is a bug in IE, not something that needs changing in the spec, though you might argue it would still be useful to specify a default button since many window systems display the 'default' button in a dialogue box differently to others. Interestingly, this bug doesn't happen if there is only one text field in the form. More: http://ppewww.ph.gla.ac.uk/%7Eflavell/www/formquestion.html ...which also suggests a workaround of a 'dummy' first submit button to swallow IE's obligatory-default problem. -- Andrew Clover Technical Consultant 1VALUE.com AG
Received on Tuesday, 8 May 2001 06:14:08 UTC