<agustkri@s...>" wrote:
> If I have many forms on one page, and one button for each which calls a
> javascript function to validate and submit, how do i make the button in the
> form I'm in the default when I press enter? (maybe a little confusing?)
I'm not entirely sure what you mean here. My first thought is that you can
disable the buttons using the DISABLED attribute via Javascript, depending
over which form/part of the screen the cursor is hovering, so that you can
only ever press that one button.
I also wondered about using TABINDEX and again setting it dynamically to 1,
depending on where you are on the screen with the cursor, although this
wouldn't solve the problem.
I must admit, I'm not sure what you mean by default, if you press on one
button then the form associated with that button is submitted? As for
having a default button, until you press the TAB key, there is no default
button.
Chris