SteveS832001 has asked for the wisdom of the Perl Monks concerning the following question:

I Created a CGI Application that asks for a Phone Number and then searches a database to see if exists.
I would like it where they could click on the Search Button or just type in the number and press the
"enter" key. Is there a way to do this or not.

Replies are listed 'Best First'.
Re: CGI Enter Key question
by olus (Curate) on Feb 29, 2008 at 18:01 UTC

    That is the default behavior for a form. The following is the source code for the PerlMonks Search. If you enter some text on the input field and then press the enter key, the form is submited.

    <form method="get" action="?" enctype="application/x-www-form-urlencoded" > &nbsp; <input type="text" name="node" id="search_text" size="20" maxlength="300" /> <input class="titlebar" type="submit" value="Search" /> </form>