Re: Multiple selections
| From: | Todd Cary | Date: | Wed, 13 Nov 2002 05:02:13 +0000 |
| Subject: | Re: Multiple selections | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-124148@lists.php.net to get a copy of this message | ||
David -
Speaking of JavaScript, is there a way to block the Enter key? If I have two buttons, the Enter key always pushes the one with focus.
What is the accepted way to handle this? With one button it is nice to let the user press the Enter key and depress the one button - with two, it can be a problem.
Todd
David Rice wrote:
On Tuesday, November 12, 2002, at 07:34 PM, Ernest E Vogelsinger wrote:-- Ariste Software, Petaluma, CA 94952Sure it is - just name the listbox control "myvar[]" (note the angle brackets). PHP will recognize this being an array, and you'll end up withIs this the only way to do this? I just had to do some work with JavaScript and forms and the "myvar[]" name clobbered JavaScript's access to form elements by name. I had to do some ugly form.elements[x] looping to get at the "myvar[]" control. This kind on external language hostility is not that cool, especially toward such a common language as JavaScript. My apologies to PHP if the language provides a workaround :) David$myvar = array('select1','select2');