views:

51

answers:

1

I have a shopping cart-like form. When a user clicks on the page, in an empty space, somehow, the "Delete Item" button gets focus. Therefore, if the user clicks somewhere and presses enter, items are deleted from their cart. This only happens in IE.

What might be causing this? How can I make sure the only time this button gets focus is when it's actually clicked?

+1  A: 

Is it that the delete button you have is the only button in your form. If so IE will treat it as the submit button and whenever enter is pressed it will be run.

Ambrosia
that sounds like what is happening to me to.
Kieran