input submit weirdness--help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bosconian

    input submit weirdness--help

    I have a simple search form inside a table with 2 selects and text and
    submit inputs. When entering a string into the text input and hitting return
    (without tabbing to and clicking "Submit") the page appears to refresh, but
    no results appear. However tabbing to or clicking "Submit" work as expected.

    Here's my code:

    <tr>
    <td align='right' valign='middle' ><nobr>Addition al Keywords:</nobr></td>
    <td align='left' valign='middle' class='formFiel d'>
    <input type='text' name='Keyword' value="" class='formFiel d'>
    </td>
    </tr>
    <tr>
    <td align='right' valign='middle' >&nbsp;</td>
    <td align='left' valign='middle' class='formLabe l'>
    <input type='submit' name='submit' value='Search'>
    </td>
    </tr>

    Any suggestions are appreciated.


  • Christopher Finke

    #2
    Re: input submit weirdness--help

    "Bosconian" <bosconian@plan etx.com> wrote in message
    news:Su34d.1330 77$3l3.4025@att bi_s03...[color=blue]
    >I have a simple search form inside a table with 2 selects and text and
    > submit inputs. When entering a string into the text input and hitting
    > return
    > (without tabbing to and clicking "Submit") the page appears to refresh,
    > but
    > no results appear. However tabbing to or clicking "Submit" work as
    > expected.[/color]

    Could you post a URL of the page where this problem appears? It sounds like
    you may have nested forms or multiple submit buttons, but I can't be sure
    without seeing the complete code.

    Chhis Finke

    --
    I'll send you a gMail invite if you sign up for a free iPod and complete an
    offer: http://www.freeiPods.com/default.aspx?referer=9228418


    Comment

    • Bosconian

      #3
      Re: input submit weirdness--help

      Chris,

      Thanks for your reply.

      Unfortunately the page is inaccessible to the outside world, but I confirmed
      that the page has only one form with only one submit button.

      This is quite odd. I have other forms that work as expected. I've been
      playing with this for a long while and can't figure it out. It's probably
      something obvious, but I appreciate the extra set of eyes.

      Here's the full form including the table it's wrapped in:


      <table cellpadding='2' cellspacing='2' border='0' width='100%'
      class='content' >
      <form name='Search' method='post' action='supplie rs.php'>
      <tr>
      <td align='right' valign='top' width='16%' rowspan='5'>
      <br>
      <img src="img/title-suppliers.gif" alt="Suppliers - Find a Supplier"
      width="119" height="37">
      </td>
      </tr>
      <tr>
      <td width="25%" align='right' valign='middle' ><br>Select a Region:</td>
      <td width="59%" align='left' valign='middle' class='formFiel d'><br>
      <select name='RegionID' class='formFiel d'>
      <option value=''>All Regions</option>
      <option value='1'>Coast </option>
      <option value='2'>Metro </option>
      <option value='3'>Mount ain</option>
      <option value='4'>Valle y</option>
      <option value='5'>South ern</option>
      <option value='6'>Centr al</option>
      <option value='7'>Easte rn</option>
      </select>
      </td>
      </tr>
      <tr>
      <td align='right' valign='middle' >Select a Supplier:</td>
      <td align='left' valign='middle' class='formFiel d'>
      <select name='ServiceTy peID' class='formFiel d'>
      <option value=''>All Suppliers</option>
      <option value='1'>DMO</option>
      <option value='2'>Lodgi ng</option>
      <option value='3'>Resta urants</option>
      <option value='4'>Shopp ing</option>
      <option value='5'>Sight seeing & Attractions</option>
      </select>
      </td>
      </tr>
      <tr>
      <td align='right' valign='middle' ><nobr>Addition al Keywords:</nobr></td>
      <td align='left' valign='middle' class='formFiel d'>
      <input type='text' name='Keyword' value="casino" class='formFiel d'>
      </td>
      </tr>
      <tr>
      <td align='right' valign='middle' >&nbsp;</td>
      <td align='left' valign='middle' class='formLabe l'>
      <input type='submit' name='submit' value='Search'>
      </td>
      </tr>
      </form>
      </table>

      "Christophe r Finke" <cfinke@gmail.c om> wrote in message
      news:2rc2s7F17p acpU1@uni-berlin.de...[color=blue]
      > "Bosconian" <bosconian@plan etx.com> wrote in message
      > news:Su34d.1330 77$3l3.4025@att bi_s03...[color=green]
      > >I have a simple search form inside a table with 2 selects and text and
      > > submit inputs. When entering a string into the text input and hitting
      > > return
      > > (without tabbing to and clicking "Submit") the page appears to refresh,
      > > but
      > > no results appear. However tabbing to or clicking "Submit" work as
      > > expected.[/color]
      >
      > Could you post a URL of the page where this problem appears? It sounds[/color]
      like[color=blue]
      > you may have nested forms or multiple submit buttons, but I can't be sure
      > without seeing the complete code.
      >
      > Chhis Finke
      >
      > --
      > I'll send you a gMail invite if you sign up for a free iPod and complete[/color]
      an[color=blue]
      > offer: http://www.freeiPods.com/default.aspx?referer=9228418
      >
      >[/color]


      Comment

      • David Dorward

        #4
        Re: input submit weirdness--help

        Bosconian wrote:

        Please read: http://www.allmyfaqs.com/faq.pl?How_to_post before responding.
        [color=blue]
        > <table cellpadding='2' cellspacing='2' border='0' width='100%'
        > class='content' >
        > <form name='Search' method='post' action='supplie rs.php'>[/color]

        This is not a valid construct in HTML. <form> elements can contain entire
        tables, or an exist entirely within table data (or heading) cells, but can
        not be a child element of a table or a parent element of a table row.

        <http://validator.w3.or g/>
        <http://diveintomark.or g/archives/2003/05/05/why_we_wont_hel p_you>

        --
        David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
        Home is where the ~/.bashrc is

        Comment

        • Lāʻie Techie

          #5
          Re: input submit weirdness--help

          On Wed, 22 Sep 2004 03:01:24 +0000, Bosconian wrote:
          [color=blue]
          > <form name='Search' method='post' action='supplie rs.php'>[/color]

          [snip /]
          [color=blue]
          > <input type='submit' name='submit' value='Search'>[/color]

          I would check out suppliers.php . I bet it is using the presence of
          $_POST['submit'] (or even $submit if register_global s is on) to determine
          that the form has been submitted.

          I would suggest creating a simple PHP page like this:

          <!-- begin info.php -->
          <?php php_info(); ?>
          <!-- end info.php -->

          Now set your form's action to "info.php". After pressing [enter], is
          there an entry for $_POST['submit'] ?

          HTH,
          La'ie Techie



          Comment

          • Bosconian

            #6
            Re: input submit weirdness--help

            David,

            Thanks for your reply.

            I moved the <form> tags to the outside of the <table> tags, but
            unfortunately that didn't effect the behavior.


            "David Dorward" <dorward@yahoo. com> wrote in message
            news:cir70r$q6r $1$830fa795@new s.demon.co.uk.. .[color=blue]
            > Bosconian wrote:
            >
            > Please read: http://www.allmyfaqs.com/faq.pl?How_to_post before[/color]
            responding.[color=blue]
            >[color=green]
            > > <table cellpadding='2' cellspacing='2' border='0' width='100%'
            > > class='content' >
            > > <form name='Search' method='post' action='supplie rs.php'>[/color]
            >
            > This is not a valid construct in HTML. <form> elements can contain entire
            > tables, or an exist entirely within table data (or heading) cells, but can
            > not be a child element of a table or a parent element of a table row.
            >
            > <http://validator.w3.or g/>
            > <http://diveintomark.or g/archives/2003/05/05/why_we_wont_hel p_you>
            >
            > --
            > David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
            > Home is where the ~/.bashrc is[/color]


            Comment

            • Bosconian

              #7
              Re: input submit weirdness--help

              Ok, I outputted phpinfo as you suggested and $_POST['submit'] is not present
              when hitting enter.

              I haven't experienced this before. Any ideas why this is happening?

              "La?ie Techie" <laie@win_remov e_get_nospam_so lutions.com> wrote in message
              news:1095839940 .tlWHrDEHCT1fwb 7Tmi0YeA@terane ws...[color=blue]
              > On Wed, 22 Sep 2004 03:01:24 +0000, Bosconian wrote:
              >[color=green]
              > > <form name='Search' method='post' action='supplie rs.php'>[/color]
              >
              > [snip /]
              >[color=green]
              > > <input type='submit' name='submit' value='Search'>[/color]
              >
              > I would check out suppliers.php . I bet it is using the presence of
              > $_POST['submit'] (or even $submit if register_global s is on) to determine
              > that the form has been submitted.
              >
              > I would suggest creating a simple PHP page like this:
              >
              > <!-- begin info.php -->
              > <?php php_info(); ?>
              > <!-- end info.php -->
              >
              > Now set your form's action to "info.php". After pressing [enter], is
              > there an entry for $_POST['submit'] ?
              >
              > HTH,
              > La'ie Techie
              >
              >
              >[/color]


              Comment

              • David Dorward

                #8
                Re: input submit weirdness--help

                Bosconian wrote:

                Please read: http://www.allmyfaqs.com/faq.pl?How_to_post before responding.
                [color=blue]
                > Ok, I outputted phpinfo as you suggested and $_POST['submit'] is not
                > present when hitting enter.
                >
                > I haven't experienced this before. Any ideas why this is happening?[/color]

                The form control with the name "submit" isn't being activated. You are not
                pressing Enter while it has the focus, and you are not clicking on it. The
                form is being submitted via other means.


                --
                David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
                Home is where the ~/.bashrc is

                Comment

                Working...