| 
 Posted by Paul Furman on 03/15/07 21:49 
I'm getting incorrect response when hitting the enter key instead of  
actually clicking the button on a form. It activates but the post data  
[value='Update'] isn't being sent I think. The php generated page  
flickers & reloads but doesn't perform the update. 
 
This is php generated, I'm just pasting the page source (reformatted &  
extra junk removed and I think they are now identical), and it's running  
on my localhost apache server for testing so maybe there's something  
funny with my setup. Crossposted to html & php groups. 
 
 
Must click button (no enter): 
 
<form action='?SC=cart.php' method='POST'> 
  <tr> 
   <td> 
    <input type='hidden' name='item' value='6077'>name 
   </td> 
   <td> 
    <input type='submit' name='buy' value='Update'> 
   </td> 
   <td> 
    <input type='text' name='item_qty' size='1' value='2'> 
   </td> 
  </tr> 
</form> 
 
 
Enter or click works fine: 
 
<form action='?SC=cart.php' method='POST'> 
  <tr> 
   <td> 
    <input type='hidden' name='item' value='6540'>name 
   </td> 
   <td> 
    <input type='submit' name='buy' value='Update'> 
   </td> 
   <td> 
    <input type='text' name='item_qty' size='1' value='2'> 
   </td> 
  </tr> 
</form> 
 
 
 
Here they are without me fixing up the formatting: 
 
Must click button (no enter): 
 
<form action='?SC=cart.php' method='POST'><tr> 
<td><input type='hidden' name='item' value='6540'>Adiantum jordanii /  -  
1 gal</td> 
<td><input type='submit' name='buy' value='Update'></td> 
<td><input type='text' name='item_qty' size='1' value='1'></td> 
<td>$ 9.00 </td><td>$ 9.00 </td><td>0%</td> 
	<td>10%</td> 
</tr></form> 
 
 
Enter or click works fine: 
 
<form action='?SC=cart.php' method='POST'><tr> 
<td><input type='hidden' name='item' value='6077'>Adiantum jordanii /  -  
1 gal</td> 
<td><input type='submit' name='buy' value='Update'></td> 
<td><input type='text' name='item_qty' size='1' value='2'></td> 
<td>$ 10.00 </td><td>$ 20.00 </td></tr></form> 
<tr><th colspan='4' align='right'>Tax:</td><td>$  
1.70</td><td> </td></tr> 
<tr><th colspan='4' align='right'>Delivery:</td><td>$  
0.00</td><td> </td></tr> 
<tr><th colspan='4' align='right'>Order Total:</th><th>$ 21.70</th> 
<th><form action='?SC=checkout.php' method='post'><input type='submit'  
name='checkout' value='Checkout'></form>
 
  
Navigation:
[Reply to this message] 
 |