PDA

Click to See Complete Forum and Search --> : focus on a button


KingSatan
Apr 26th, 2007, 12:55 PM
i dont know if this is in my code or in asp or a bug or what...

but i have this web form
the admin side looks like this

http://img408.imageshack.us/img408/3706/untitled2bf3.th.png (http://img408.imageshack.us/my.php?image=untitled2bf3.png)

but everything is good (finally) except when u click a text box the button has focus..... so if you click one of the botttem "add new" text boxes, and hit enter it calls the top "addnew" button.click.... but still if u click one of the top textboxes and hit enter then the top button still clicks....

know what i mean?

its irritating...

is there a way to disable enter while in the textboxes? or something more simple to resolve this little annoyance?

penagate
Apr 27th, 2007, 09:40 AM
I think you've probably put the controls all in the same form. The Enter key triggers the submission of a form. Hence, you cannot have multiple submission buttons; you must place each section in its own form.


By the way, for future reference, you'll get a quicker response in the ASP.NET section, which is where all web-related questions should go.