How come the first <button> gets activated inside a form?
I have a <form> Inside that form, I have 2 submit buttons.
The first one is this:
<button class="regular" id="geocodesubmit" style="height:40px;">Set Loc ation</button>
The second one is this:
<button type="submit" class="regular" name="Submit Discovery">Submit</button>
How come my first button gets activated when I push enter on one of the text boxes? I want the 2nd one to activate...
I don't want the first one to respond to any keypresses.
Note: I don't want to use input type="submit", because I have a lot of other css stuff.
The HTML4 spec says that the default type of a button tag is submit. See: http://www.w3.org/TR/html401/interact/forms.html#h-17.5
So your problem is simply the fact, that your first button doesn't have a type attribute and will therefore act like another submit button.
To fix it set type="button" for the first button.