Click here to get back home

input submit weirdness--help

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
input submit weirdness--help Bosconian 09-22-2004
Get Chitika Premium
Posted by Bosconian on September 22, 2004, 1:15 am
Please log in for more thread options
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>Additional Keywords:</nobr></td>
<td align='left' valign='middle' class='formField'>
<input type='text' name='Keyword' value="" class='formField'>
</td>
</tr>
<tr>
<td align='right' valign='middle'>&nbsp;</td>
<td align='left' valign='middle' class='formLabel'>
<input type='submit' name='submit' value='Search'>
</td>
</tr>

Any suggestions are appreciated.




Posted by Christopher Finke on September 21, 2004, 9:29 pm
Please log in for more thread options
>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.

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




Posted by Bosconian on September 22, 2004, 4:01 am
Please log in for more thread options
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='suppliers.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='formField'><br>
<select name='RegionID' class='formField'>
<option value=''>All Regions</option>
<option value='1'>Coast</option>
<option value='2'>Metro</option>
<option value='3'>Mountain</option>
<option value='4'>Valley</option>
<option value='5'>Southern</option>
<option value='6'>Central</option>
<option value='7'>Eastern</option>
</select>
</td>
</tr>
<tr>
<td align='right' valign='middle'>Select a Supplier:</td>
<td align='left' valign='middle' class='formField'>
<select name='ServiceTypeID' class='formField'>
<option value=''>All Suppliers</option>
<option value='1'>DMO</option>
<option value='2'>Lodging</option>
<option value='3'>Restaurants</option>
<option value='4'>Shopping</option>
<option value='5'>Sightseeing & Attractions</option>
</select>
</td>
</tr>
<tr>
<td align='right' valign='middle'><nobr>Additional Keywords:</nobr></td>
<td align='left' valign='middle' class='formField'>
<input type='text' name='Keyword' value="casino" class='formField'>
</td>
</tr>
<tr>
<td align='right' valign='middle'>&nbsp;</td>
<td align='left' valign='middle' class='formLabel'>
<input type='submit' name='submit' value='Search'>
</td>
</tr>
</form>
</table>

> >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.
>
> 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
>
>




Posted by Lāʻie Techie on September 22, 2004, 2:59 am
Please log in for more thread options
On Wed, 22 Sep 2004 03:01:24 +0000, Bosconian wrote:

> <form name='Search' method='post' action='suppliers.php'>

[snip /]

> <input type='submit' name='submit' value='Search'>

I would check out suppliers.php . I bet it is using the presence of
$_POST['submit'] (or even $submit if register_globals 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





Posted by Bosconian on September 23, 2004, 12:40 am
Please log in for more thread options
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?

> On Wed, 22 Sep 2004 03:01:24 +0000, Bosconian wrote:
>
> > <form name='Search' method='post' action='suppliers.php'>
>
> [snip /]
>
> > <input type='submit' name='submit' value='Search'>
>
> I would check out suppliers.php . I bet it is using the presence of
> $_POST['submit'] (or even $submit if register_globals 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
>
>
>




Similar ThreadsPosted
& in one action? April 4, 2005, 6:34 am
Passing Data without Submit/Input October 6, 2004, 12:25 am
Highlight the object of my choice? November 26, 2004, 12:35 pm
remote submit... is it possible? April 8, 2008, 6:25 am
Re: HTML - submit May 19, 2008, 9:30 am
Re: HTML - submit May 19, 2008, 10:14 am
Submit a form with hyperlink August 6, 2004, 11:56 pm
Submit a form without using a button? December 24, 2004, 4:26 pm
CSS submit button problem March 17, 2005, 1:08 pm
Form submit problem in IE March 31, 2006, 7:41 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap