Menu

#4 Enter key not working correctly in search

open
nobody
None
5
2005-03-02
2005-03-02
Alex
No

When pressing Enter instead of clicking the search
button in any search textbox, no results get returned. If
the search is performed by clicking on the button, results
are returned correctly.

I am running PHP 5.02, IE 6

Discussion

  • Alex

    Alex - 2005-03-05

    Logged In: YES
    user_id=1230519

    By the way, now that I have Opera and Firefox running with
    phpcc, I noticed that this only happens in IE. Opera and
    Firefox correctly return the search results.

     
  • GoGoGadgetScott

    GoGoGadgetScott - 2005-04-13

    Logged In: YES
    user_id=1256717

    This issue is conformed. When a user submits the search
    form by right-clicking on the submit button several piece of
    information as send to the sever via post. File “search.php”
    confirmed user is submitting information be checking the value
    of variable “submit”. If a value is set, the form values used as
    input and search is preformed. In the case where the submit
    variable is not set, a blank search form is sent to user. Some
    browsers (Internet Explorer) do not send the submit value
    when submitting a form via keyboard Enter key. As a result,
    phpcc ignores any submitted values without the submit value
    being set.

    The issue may be resolved by make a change in file “search.
    php”, as follows:
    Find line:
    if ((!$_POST['submit']) && (!$_GET['num_results'])) {
    Replace line with:
    if ((!$_POST['searchtype']) && (!$_GET['num_results'])) {

    The change will check if form is submitted by check the value
    of variable “searchtype”, witch is sent at all times when
    submitting search for in any browser by method of mouse or
    keyboard. Note that “searchtype” is a hidden form element
    and currently unused.

     
  • GoGoGadgetScott

    GoGoGadgetScott - 2005-04-13

    Logged In: YES
    user_id=1256717

    This issue is conformed. When a user submits the search
    form by clicking on the submit button several piece of
    information as send to the sever via post. File “search.php”
    confirmed user is submitting information be checking the value
    of variable “submit”. If a value is set, the form values used as
    input and search is preformed. In the case where the submit
    variable is not set, a blank search form is sent to user. Some
    browsers (Internet Explorer) do not send the submit value
    when submitting a form via keyboard Enter key. As a result,
    phpcc ignores any submitted values without the submit value
    being set.

    The issue may be resolved by make a change in file “search.
    php”, as follows:
    Find line:
    if ((!$_POST['submit']) && (!$_GET['num_results'])) {
    Replace line with:
    if ((!$_POST['searchtype']) && (!$_GET['num_results'])) {

    The change will check if form is submitted by check the value
    of variable “searchtype”, witch is sent at all times when
    submitting search for in any browser by method of mouse or
    keyboard. Note that “searchtype” is a hidden form element
    and currently unused.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.